Fixed width div on left, fill remaining width div on right
Try removing the float:left
and width:100%
from .header-right
— the right div
then behaves as requested.
.header {
float: left;
background: #efefef;
background-repeat: no-repeat;
width: 240px;
height: 100px;
}
.header-right {
overflow: hidden;
background-color: #000;
height: 100px;
}
<div class="header"></div>
<div class="header-right"></div>