div tag soup ...

| 2 Comments | No TrackBacks

Over at 456 Berea Street, Roger Johannsen points to a must read article at Juicy Studio titled Div Mania.

"More and more web documents are appearing that consist of nothing more than a collection of div elements. In most cases, better use of CSS selectors could be used to avoid overusing the div element."

Includes a very useful explanation of selectors.

It makes sense though, moving from tables-based to CSS layouts one brings with them the same mindset of putting stuff together. Divs are overused because the way they're used makes sense initially. Now reading the article, it makes much more sense to do things right ;)

No TrackBacks

TrackBack URL: http://www.elektrikink.org/mt/mt-tb.cgi/55

2 Comments

Why is it so bad to use as many DIV as we want? Why is the big deal about it? What about the meaning of the DIV? DIV is an invisible element as far as semantic concern. What is next? P(itis) and strong(itis). If you need it in your design, use it. For instance, Eric Meyer uses 31 DIV, Doug Bowman 25, Dave Shea 17. Could anyone tell me their code is worse than someone who uses 4 or 2 DIV? Let's not worry about how many DIV we use at this moment as long as we use it. We are still in early stage in this game. There are people out there that cook TABLE-mania soup.

Hey Mehmet - I think maybe you misunderstood. It's not about using as many DIVs as you want but use as many DIVs as you need. What Gez was saying is not to not use DIVs but to use them when you need them, not overuse or mis-use them. There are some examples in the comments to the article. I'm just agreeing that purifying (a better word might be simplifying) your CSS so that you're using selectors as they were meant to be used and using DIVs when you need to use them makes sense. Shouldn't you rather style an H1 than add a "pagetitle" DIV?

Leave a comment

Archives

www.flickr.com


Visit my flickr photostream.