.container {
max-width: 750px;
height: 100px;
background-color: red;
margin: 0;
padding: 0;
}
.box1 {
width: 100px;
height: 100%;
float: left;
background-color: black;
}
.box2 {
width: 650px;
height: 100%;
float: left;
background-color: black;
}
<div class="container">
<div class="box1"></div><div class="box2"></div>
</div>
I am trying to ensure that .box2
shrinks proportionally as .container
decreases in size. Unfortunately, setting max-width: 650px;
does not seem to be effective. Instead of wrapping onto a new line when the browser window narrows, I want .box2
to maintain its maximum dimensions.