4 ms·
While this is a good overview of the css float property, I just hate that they specify its usage for the 3-column layout; that's not what it was intended for.
by zepolen 17y ago
While this is a good overview of the css float property, I just hate that they specify its usage for the 3-column layout; that's not what it was intended for.
Almost every time someone calls css 'terrible for layout' it's because they are trying to emulate the old table or print style layouts, these however have the ability to make a very serious assumption, that they will be put on a fixed size medium.
On the web however, there is no fixed medium, that 'holy grail' 3 column layout fails in this respect, if you for example decrease the browser width, it will squash everything inside the elements rather than do what a float was supposed to solve, ie. as an element is too wide for its container, float underneath.
Take the HN header for example. It is a table, which means that as you decrease the width of the browser, the login/username on the right squashes the menu buttons.
With good float design, ie. float right the username, float left the menu buttons and the logo, then these would all float under each other in an easier to follow layout.