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 07/16/06


Tagged

css ie background repeat bug


Versions (?)


Who likes this?

12 people have marked this snippet as a favorite

jonhenshaw
meth
postNuKe
panatlantica
fatihturan
horizens
dojob
icarus
fael
vali29
aziz
SpinZ


Fix li Background Repeat Bug In IE


Published in: CSS 


A bug seems to occur when you add a negative margin to a list item in IE6. The background image applied to the list item gets repeated randomly and generally messes up. Add this little gem to your head to fix the problem. Remember to change the id tag to your own.


  1. <!--[if lt IE 7]>
  2. <style>
  3. #leftnav li { zoom: 1;} /* haslayout=true */
  4. </style>
  5. <![endif]-->

Report this snippet 

You need to login to post a comment.