IE7 Background images on a blank link

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

IE7 will not show background images on a item that has no text. This is probably true with ie6 as well.

The best trick I've found is to display:inline-block, but you must do this for ie7 only

Copy this code and paste it in your HTML
  1. <!--[if IE 7]><link rel="stylesheet" type="text/css" href="/css/IE7.css" /><![endif]-->
  3. .ie7blanklink
  4. {
  5. display:inline-block;
  6. }
  8. <a title="Click Me" class="ie7blanklink" style="background: url('/images/email_trim.gif') no-repeat right center; padding-left: 20px; margin-left: 5px;" onclick="updatePermission(this);return false;" href="#" id="email_0"></a>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.