We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

1man on 05/21/07


Tagged

css image replacement


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

basicmagic
ggb2g
stoker
jonhenshaw


Image Replacement (No Extra Span)


Published in: CSS 


URL: http://moronicbajebus.com/wordpress/wp-content/cssplay/image-replacement/

CSS image replacement with no extra span needed.


  1. #ex1 {
  2. padding-top: 133px;/*Size of the image*/
  3. width: 243px;
  4. background: url(ex1.gif) no-repeat;/*The image*/
  5. overflow: hidden;/*Hide the text*/
  6. height: 133px;
  7. voice-family: "\"}\"";/* WIN IE5 hack */
  8. voice-family: inherit;
  9. height: 0;
  10. }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: jonhenshaw on June 23, 2008

Works like a charm! Goodbye stupid spans...

You need to login to post a comment.