News for hackers. Stuff that matters.
Re:Javascript and CSS best practices for better performance by juliusdavies on Tuesday June 15, 2010 @02:59PM (#1433525)
#29 No Tables. How does that help performance? Sure on very large pages that might help, since the table usually won't render until the </table> has been sent, but maybe the better tip would be "avoid very large pages" (i.e. 100KB or more of HTML). DIV based layout also degrade if text in a single cell is very large, whereas Table based layout is robust against that. Also, I don't understand why <TABLE> is bad, but this is okay!?!?!

  <div class='table'>
  <div class='tr'>
    <div class='td'>1</div><div class='td'>2</div><div class='td'>3</div>
  </div>
  <div class='tr'>
    <div class='td'>a</div><div class='td'>b</div><div class='td'>c</div>
  </div>
  </div>
Which is what DIV/FLOAT layout usually ends up becoming. If your DIV/FLOAT layout doesn't map to a structure like that, you're probably doing something wrong!

Finally, has IE fixed the "we double the padding on floats" issue? Because float-driven layout with that bug is pretty hard, since IE will double your paddings while the other browsers don't.

I do know that proudly espousing TABLE in a job interview can cost you the job. But aside from that TABLE is very effective for most layouts. I do avoid TABLE inside TABLE of course, that's a code smell, but top level TABLE is the right tool most of the time. Do anti-TABLE people also avoid Excel?

Re:Javascript and CSS best practices for better performance by webuiarchitect on Wednesday June 16, 2010 @12:33AM (#1434710)
Updated the blog with some explanation on why TABLEs for layout is not a good idea. Please recheck.