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.

About Cristian Radulescu

PHP // MySql // Linux // Android
This entry was posted in CSS, HTML, Programming, Software and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>