Header Image Replacement


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

Last height property is for ie 5.5


Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.