Consieder the following please:
.d1 {
width: 100px;
float: left;
}
.d2 {
width: auto;
float: left;
}
<div class="d1">Content fixed</div>
<div class="d2">This content should take the rest of the page (on vertical side)</div>
This does not work.
How can I let a fixed width div stay on the left of a variable (window adaptive) width div?
Thank you.
Removing the
floatfrom.d2and giving it a left padding equivalent to.d1‘s width will do the trick:You can see it in action here.