CSS Based Design is not Div Based Design
The title is a quote from Molly Holzschlag from her CSS for Developers presentation at Rich Web Experience 2008 in Washington DC. She was asking the group who still uses tables for layout and one person said they were in the process of changing everything to divs. Molly, seeming a tiny bit frustrated from hearing this to many times, then made the proclamation that “css based design is not div based design”. I clapped, no one else did.
I hear this way to often and I couldn’t agree with her more. In interviews or just in conversation with other UI engineers: “How do you do your layouts?”, “We don’t use tables, we use divs!”. I’m not suggesting divs go the way of the table, I like using them to separate major sections of a site, header, content, footer, or as a container for something that is an actual container for information such as a weather widget, but if you are using an unordered list for a menu, the UL is your container, no need to wrap it in a div. When you have 6 nested divs and layout can be done with one using the right techniques, it’s almost as bad as a table. Almost.
I totally agree, specially when list is the logical meaning of the content;
H* headers tags and line breaks and so on ..
it’s only “table-less” design not a div design..!
I do have some notes here, may be because div tags are more “generic” people highly depend on the css identification I mean if I had a div with class list it will act as a list forever and it kinda gives me the feeling of having my own list tag :); That’s may be pushes normally bias normal designers to do such a “div” design.
Besides,In the case of having content that’s is retrieved from 3rd party data source, formatted in XML-as a common case- you will fetch content and based on item id you will format it; In most of cases they are “posts”, “news”,”entry”,”item”,”photo” …etc and you tend to have “div” tags that have that look almost like the XML tags and now you will simply write the right identifier in your CSS linked file or something, right?
So list styled div will not appear as a headache here.
I do agree with you, I just wanted to state these notes for clarification sake as I disagree on performance headache resulted by using div that has a list style instead of list..
Sorry for long comment.
Nice post
Thank you,