SEO Zentrum > SEO News > Blog posts

SEO News

  • Bookmark and Share

Fixing the double float margin bug

11.05.2010 von Olaf Wulf

How to fix the Internet Explorer double float margin bug

The IE double float margin bug shows up in practically every floated CSS layout. If there is a floating element with a margin value, its margin will be doubled in IE6. To fix this behaviour, simply set the floated element's display property to inline. Here is a short example that uses the "Star HTML Hack":
#element {
float:left; margin:10px;
}
* html #element {
display:inline; /* IE only */
}

Zurück

Einen Kommentar schreiben

SEO Zentrum > SEO News > Blog posts