Fix for IE6/7 background image on anchor in wrapped text bug


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

In IE6 and IE7 when wrapping an anchor to the next line, the first anchor with the class="anchorClass" will not display the background image nor have the clickable padded area.

In your IE6 & IE7 bugfixes CSS adding the property/value display:inline-block; to the anchor class will fix this for IE.


Copy this code and paste it in your HTML
  1. Normal CSS;
  2. .anchorClass a {background:url('image.gif') center right no-repeat;}
  3.  
  4. IE6 & IE7 extra bugfix CSS;
  5. .anchorClass a {display:inline-block;}

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.