Wednesday, November 28, 2007

Table vs DIV Tag Layouts

Am I a bad person because I fall back on using Tables to some of my layouts?  Ok, maybe "bad-person" isn't the right term, but over the past year or so I've started to pay extra-special attention to the HTML.  I'm trying to carve out for my apps to build the HTML with DIV tags and not tables, for the most part this works good, but in some cases after about 15 minutes of screwing around I fall back to my crutch of just doing the old table with colspan and rowspan.  In most cases where I get in trouble is with more complicated layouts that include nested divs/spans with images using the float:left style.  It seems like these get real tricky to keep lined up right when you want to keep the "flow" concept of HTML intact instead of doing absolute or relative position.  It also gets a bit interesting when you try to make it work on different browsers, layouts in one browser look good but because of different rendering techniques paragraphs with images that "floated" nicely all of a sudden look like a mess.

So I guess I can understand some possible performance improvements with a div strategy (are these really negligible) and unless you are doing absolute positioning, (which I feel sort-of dirty after doing so) are there any downfalls to just falling back to tables?

Comments?  Thoughts?  Two-Cents?


No comments:

Post a Comment