I'm trying to get a logo in a div to appear bigger proportionally on mobile than on desktop. It looks great at 100% width on mobile, but on desktop it's way too big. How could I scale the div's width percentage down as the screen gets bigger? Essentially going from 100% at the lowest screen dimension to 30% at the highest.
.outer {
display: table;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.middle {
display: table-cell;
vertical-align: middle;
}
.inner {
margin-left: auto;
margin-right: auto;
width: 3%;
}
#logo {
width: 100%;
height: auto;
}
<div class="outer">
<div class="middle">
<div class="inner" style="max-width:100vw;">
<img id="logo" src="https://via.placeholder.com/100">
</div>
</div>
</div>