On 07/09/2005, at 9:31 AM, Kenny Graham wrote:

In most of the previous table layout vs css layout arguments I've seen on here, people refer to "divs vs tables". Now, I never learned table based layouts, and don't understand them (spacer gifs, etc). Because of this, I don't/can't think along the lines of "I'm replacing tables with divs". But many of the XHTML/CSS sites I see clearly do. For instance, they'll put a <ul> inside a <div id="menu">, just so that they can style the <ul>, instead of just giving the <ul> itself an id. Or put the contents of a paragraph inside a <span id="p1"> instead of giving the paragraph itself an id of p1. The only time divs don't make me cringe is when they're used to enclose a group of elements with the header that applies to them, and this purpose of divs is being replaced with <section>. I know that divs are more semantically neutral than tables, but is wrapping an element in 5 divs and a span really that much better than wrapping it in a table? Hopefully this will start a debate that I can learn something from, since I have a limited background in tables.

I'd actually be inclined to agree with you, even though I did start out in web development with table-based design. It made sense then, and was especially easy when you used something like Photoshop or Fireworks to design a beautiful graphical layout, carve it up, and export it directly as a table. In hindsight, however, I think it mostly made sense because we knew no other way.

Since I've started working towards standards-based design, I actually haven't really done the whole "replace every table cell with a div" thing. One of the attractions for me was that I could create much cleaner code that was easier to edit by hand (which I much prefer to using a WYSIWYG, most of the time) and so hanging IDs and classes directly on the elements I wanted to style just made sense.

I have, however, seen a lot of the sites that you are thinking of here. I've even seen a number of tutorials that follow the "table cell = div" method. I usually follow the tutorial to make sure I get all the bits right, then go back and try to clean it up by eliminating unnecessary divs. It doesn't always work, and sometimes I find I've completely ballsed it up, but I have learned a lot that way. *grin*

Cheers,

Seona.
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to