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

Home Forums CSS Simple Sprite Not Working Re: Simple Sprite Not Working


I’m confused by your response as the code below basically does what you’re asking. Your markup is invalid as I’m pretty sure you cannot have a div inside header tags. And the image sprite will only appear with an H1 class of home (h1.home) and an H2 class of news (


Latest News

/***** CSS *****/
h1.home:before, {
display: block;
float: left;
width: 50px;
height: 50px;
margin-right: 20px;
background: url("/SPRITE/URL/image.png")no-repeat;

h1.home:before { background-position: 0 0; } { background-position: -50px 0; }