Absolute Or Float Layout
From CSS Discuss
Pros and Cons of Absolute vs Float Page Layout
Absolute Positioning Layout (using "
- Precise positioning of elements in relation to their nearest positioned ancestor.
- Allows you to create a page where the order of the information in the HTML is completely different than the order things appear on the page, i.e. navigation columns can be pushed down to the end of the HTML code but still appear as the left column of the page.
- Because absolutely positioned elements are no longer in the document flow, it is harder to line them up with other page sections. There is no way to instruct other parts of the page to start or end with respect to the absolutely positioned element, instead you must allow enough room in the design for both the maximum and minimum size that the element could ever have.
- Possibility of overlaps.
- If you don't know which column will be longest, you can't have a footer that spans all the columns.
Float Layout (using "
float:left" or "
- Easier to achieve simple layouts.
- Avoids the footer problem. See Footer Beneath Sidebar .
- Tied to the document flow. Allows less flexibility.
- Lots of browser bugs, that, although possible to get around, add significantly to browser testing and tweaking time.
See also: Css Positioning