Posted By

rtcrm on 10/27/08


Tagged

css image html text replacement seo Logo clickable rtcrm


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

jessibird
jonhenshaw


Image / Text Replacement - Clickable


 / Published in: CSS
 

RTCRM Image/Text replacement for clickable image. This is useful for logo images.

  1. <h1>
  2. <a href="/">RTC<em>RM</em></a>
  3. </h1>
  4.  
  5. h1 {
  6. font properties here
  7. }
  8.  
  9. h1 a { // This can be any inline element: span, strong, em, etc.
  10. display: block; // This forces the <a> element to be as wide as the containing <h1>
  11. width: XXXpx;
  12. height: XXXpx;
  13. background: url('../img/logo.gif') no-repeat 0 0;
  14. overflow: hidden;
  15. text-indent: -9999px;
  16. }
  17.  
  18. /* Example from header on 2008 RTCRM public site */

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jessibird on December 6, 2008

Thank you! Just put it to use!

You need to login to post a comment.