Posted By

gtalmes on 03/08/08


Tagged

image text


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

wbowers
basicmagic
SpinZ
wiired
asturi


Replace text with image


 / Published in: CSS
 

I did not author this code. I came across it and have found it to be useful.

  1. #ID_OF_ELEMENT {
  2. padding: HEIGHT_OF_IMAGEpx 0 0 0;
  3. overflow: hidden;
  4. background-image: url("hello_world.gif");
  5. background-repeat: no-repeat;
  6.  
  7. height: 0px !important;
  8. height /**/:HEIGHT_OF_IMAGEpx;
  9. }

Report this snippet  

You need to login to post a comment.