CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.
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.
You must be logged in to reply to this topic.
Search for Stuff
Browse the Archives
Get the Newsletter
... or get the RSS feed