Posted By

benjaminpearson on 06/11/09


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

cesgra
aleksanderek
ReeceMarsland


Header Image Replacement


 / Published in: CSS
 

URL: http://www.kryogenix.org/code/browser/lir/

Last height property is for ie 5.5

  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. }
  10.  
  11. /* Image replacement class that works on form buttons, etc */
  12. .image-replaced {
  13. text-indent: -5000px;
  14. background-color: transparent !important;
  15. background-repeat: no-repeat !important;
  16. padding: 0 !important;
  17. font-size: 0 !important;
  18. line-height: 0 !important;
  19. }

Report this snippet  

You need to login to post a comment.