Can I get an explanation of why this code gives the result? And a way to fix / get around it, if possible.
I do not want divs 'z' and 'q' to cross the “blue border of the div” to the right.
Or
I would like div 'x' to match "z" and "q", and also go through the blue right border.
<div style='margin: 5px;width: 653px;border: blue 1px solid;float: left;'>
<div style='margin: 0px; margin-bottom: 5px;width: 100%;border: red 1px solid;/*float: left;*/'>z</div>
<div style='overflow: hidden;margin: 0px; margin-bottom: 5px;width: 100%;border: red 0px solid;/*float: left;*/'>
<div style='margin: 0px; margin-bottom: 0px;width: 300px;border: red 1px solid;float: left;'>y</div>
<div style='margin: 0px; margin-bottom: 0px;width: 300px;border: red 1px solid;float: right;'>x</div>
</div>
<div style='margin: 0px; margin-bottom: 5px;width: 100%;border: red 1px solid;/*float: left;*/'>q</div>
source
share