4 ms·
Sure, until you need to print the page. Or show it on a iPad.
by lhorie 16y ago
Sure, until you need to print the page. Or show it on a iPad.
- foljs 16y agoIn both cases, it works just fine. Your point? Fact 1: Tables are not very good web layout tools, and were not invented for the purpose. Fact 2: CSS floats are not very good web layoyt tools. In fact, they are horrible, and were not invented for the purpose either (check the W3C specs). Fact 3: A grid layout approach is the best layout approach we now. We use it in DTP, we use it in most desktop software GUI designers, and we use it when using tables (a table = a poor mans layout grid), and we try to mimic it with horrible hacks when using CSS layouts. Fact 4: The W3C is working on a proper grid based layout method, the CSS3 Grid positioning module ( http://www.w3.org/TR/css3-grid/ http://www.w3.org/TR/css3-grid/ ). Sadly, not quite there yet. People tooting current css floats as the layout method are just ignorant. They are mostly graphic designers that can't see the tradeoffs and inefficiencies of this horrible implementation. And its not just the discrepancies between various browsers (notably, IE) that make it bad. CSS layout / positioning is a true example of design by committee. It makes easy things hard and hard things fragile. Just consider the basic task of centering an item: .this-is-idiotic {margin-left: auto; margin-right: auto;} or the horrible solutions to problems that should non exist anyway, like the equal height column thing (faux-columns? Using a background image? And this is the best solution that the css gurus in "A list apart" can come up with? Really?) Oh, and the lack of proper constants, declaration nesting, and everything else LESS provides. Very good standards work, after 15 years and 3 versions. Oh, and in a language all about one line statements, who had the brilliant idea to only allow /* */ comments?