Replace text with image

/ Published in: CSS
Save to your folder(s)

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

Copy this code and paste it in your HTML
  2. padding: HEIGHT_OF_IMAGEpx 0 0 0;
  3. overflow: hidden;
  4. background-image: url("hello_world.gif");
  5. background-repeat: no-repeat;
  7. height: 0px !important;
  8. height /**/:HEIGHT_OF_IMAGEpx;
  9. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.