Internet Explorer bug – duplicate characters

One of Internet Explorer versions 6 and 7 bugs, consists in repeating (duplicating) some characters from the end of some elements with the CSS atribute – float.

What’s triggering this bug:

  • Using HTML comments inserted between the elemens with the float attribute.
  • Hidden elements using display: none

Solutions to prevent the duplication of the characters:

Using conditional comments:

<!--[if !IE]> comments here <![endif]-->

Another solution – you can set for the last element with float: left, the right margin at -3px (margin-right: -3px), and -3px for the left margin of the elements with float: right. Also you can set the width of the first div with 3px larger than the width of the last element with float.

Published by Cristian Radulescu

PHP // MySql // Linux

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.