Is there a way to ensure that div B
has a width of 100% when nested inside Div A
, which already has a fixed width?
.divA{width:600px; margin:0 auto;}
.divB{width:100%; height:20px; background-color:black}
.filler{height:800px; background-color:grey}
<div class='divA'>
<div class='filler'></div>
<div class='divB'></div>
</div>
edit the problem was: .divA
had a position:relative
i had to take out