Firefox Sprite Sheet Image Not Showing Up

Posted by ttony21 on Stack Overflow See other posts from Stack Overflow or by ttony21
Published on 2010-03-31T02:09:22Z Indexed on 2010/03/31 2:13 UTC
Read the original article Hit count: 433

Filed under:
|
|
|
|

I'm trying to create a chat room with emoticons. When a user types an emoticon such as :) in the chatroom, the CSS takes the proper image off the sprite sheet. But my code only seems to work in Opera and IE (odd combination). It doesn't show in Firefox or Chrome (if you manage to hone in exactly where the image should be, you can find the image blank.gif which is used as the stand-in to place the background-url over). Does anyone know what might cause this in Firefox/Chrome?

Site: ttony21.byethost24.com

Relevant CSS:

image.emo {
  width:19px;
  height:19px;
}
image#smile {
  background:url(img/diceSprite.png) 0 0;
}
image#bigsmile {
  background:url(img/diceSprite.png) -19px 0;
}
etc...

Relevant HTML:

<img class="emo" id = "smile" src="img/blank.gif" width="1" height="1" alt=":)" title=":)" />
<img class="emo" id = "bigsmile" src="img/blank.gif" width="1" height="1" alt=":D" title=":D" />
etc...

© Stack Overflow or respective owner

Related posts about css

Related posts about firefox