Replace H1 tag with Image


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



Copy this code and paste it in your HTML
  1. HTML:
  2.  
  3. <h1><a href="http://www.jennifer-jones.co.uk/" title="Jennifer Jones"><span><img src="<?php bloginfo('template_directory'); ?>/images/logo.jpg" width="676" height="160" alt="Jennifer Jones logo" /></span>Jennifer &#9734; Jones</a></h1>
  4.  
  5. CSS:
  6.  
  7. h1 {}
  8. h1 a { position: relative; width: 331px; height: 100px; display: block; font-size: 32px;}
  9. h1 a span { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url(images/logo.png) top left no-repeat; cursor: pointer;}
  10. h1 a span img { display: none;}

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.