Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorSpookyET
    • CommentTimeMay 17th 2006
     permalink
    One has two options. The first option is to wrap portions of XHTML elements in DIVs and style their layout. This makes the XHTML document DIVY, with complicated nests. The second option is to not wrap elements in DIVs. One can create a page without a #HEADER DIV, for example. Choosing the second option, keeps the XHTML document lean and mean, without nests, and many indentation levels. However, it makes the style sheet creation more complicated by requiring more style rules and more algebra.

    In your opinion, which one is better?
  1.  permalink
    It depends on the project.

    If you're creating a template that needs to meet the needs of multiple style sheets (like the CSS Zen Garden), several nested DIVs give designers more options for elements to style.

    Normally, I tend to try and use minimal XHTML to avoid "div-itis". Using elements like h1, li, dl, etc. is always preferrable to me than excessively using SPANs & DIVs.
    •  
      CommentAuthorSpookyET
    • CommentTimeMay 17th 2006 edited
     permalink
    What I meant is the wrapping of h1, li, dl, etc. in divs for layout purposes. For example, if you want all the aforementioned elements to have a left margin of 10px. You wrap them in a wrapper div and give that div a margin of 10px. Wrap them, make the html complicated, or don't wrap them and make the css complicated?

    For example, h1, and h2 are wrapped in a #pageHeader in CSS Zen Garden. Clearly, they can stand on their own without being wrapped.
  2.  permalink
    I understood what you meant, and I think I addressed your query adequately.

    Bottom line: It depends.
    •  
      CommentAuthormringlein
    • CommentTimeMay 17th 2006
     permalink
    I know this is a "sensitive" topic, but remember the whole div-less fad that lasted 10 minutes? I do think it works sometimes to use un/ordered lists, especially when trying to keep your content organized and light on unneeded mark-up. I say that it is acceptable to use an extra DIV or two for presentation purposes, with some design concepts you have very little choice (especially with all of the shadows and background images that are popular now).
Add your comments
    Username Password
  • Format comments as (Help)