I have an internal div with a fixed size inside an external div of variable width.
#outer { width: 100%; }
#inner { width: 80px; }
<div id="outer">
<div id="inner"></div>
</div>
Run codeHide resultI want the inner div to be placed inside the outer div as follows:
[Npx of empty space][80px fixed-size inner div][2Npx of empty space]
where N is a certain number. As the window resizes, N will change, but on the right will remain twice the size on the left. Is it possible to use CSS?
source
share