Hey all,
I know that the overflow: autoo can cause horizontal scrolling when you specify a width and height. But in the below example, there's no need for it because the nested divs together only total 150px whereas the container is 180px, so why is horizontal scrolling occuring? Thanks for any response.
Code:
<body>
<div style="width:180px; background-color: green; overflow: auto;">
<div style="width: 100px; float: left;">
Looking for <span style="font-style: italic">any </span> kind of appliance you may have to offer.
</div>
<div style="width: 50px; float: right;">
List of some of interested items
<ul style="margin: 0; padding: 0;">
<li style="margin: 0; padding: 0;">Refrigerator<li>
<li style="margin: 0; padding: 0;">Oven<li>
<li style="margin: 0; padding: 0;">Microwave<li>
<li style="margin: 0; padding: 0;">Dishwasher<li>
</ul>
</div>
<div>
</body>