The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Do I suffer from Divitis?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #26489

    When I want to add an image to my page such as a header i use (example):

    background: url(imagel_src)…

    on the page i use (example):

    <div id="header"></div>

    is there a better way to do this with CSS or is this practice ok?


    Hmmmmm I wouldn’t really consider that Divitis. The fact that you are aware of the term should mean that you also have the ability to steer clear from it.

    One of the most common mistakes I see is something like:


    What it should look like is:


    Both the H1 and UL can be styled just like a div can, a common thing that is overlooked by beginners (and those suffering from Divitis!).


    good. i’m working on cleaning my code up. Is having an empty div like that ok though

    <div id="header"></div>

    I don’t really know any other way to display just an image using css in that context.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.