This was a week of learning. I hit upon an strange issue in my UI page – though the content was fitting absolutely fine – it was having an unnecessary horizontal scroll bar.
After much deliberation with the layout tab in firebug – I found that this div (with no explicit height set) was not expanding to accommodate the children inside. Further investigation pointed to the fact that the child nodes in question were actually floated & therefore they were outgrowing the parent.
http://www.tangible.ca/article_resources/expanding_divs_around_floats/ had described this exact problem succintly & provided an simple solution.
Consider the code snippet
<div id=”parent”>
<div id=”floatedchild1″></div>
………………..
<div id=”floatedchildn”></div>
</div><!– parent node ends –>
Before the parent div is closed – we would need to introduce
<div style=”clear:both”></div>
that would solve this seemingly complex issue. 🙂
Happy Coding & learning!!!!