Monday, January 5, 2009

Site Layout: Floating elements gone missing

While designing your website if you would want to use floating elements and place other elements under it, all browsers except Internet Explorer ignore the floating elements and resolve as if they don't exist. This is not because Internet Explorer has an extended technology the others lack to comprehend, quite the contrary, IE is being proactive for you and resolving something that you haven't indicated yet.
Whenever you would want to place for instance a footer under your floating content you would have to clear the floating elements by adding the following div:



right before the element you are placing beneath.
If you want to clear only left or right floating elements, you can change clear:both accordingly.

No comments:

Post a Comment