The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Do I suffer from Divitis?
When I want to add an image to my page such as a header i use (example):
on the page i use (example):
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
I don’t really know any other way to display just an image using css in that context.