How to Fix a Double Margin in IE
Older versions of Internet Explorer, such as IE5 and IE6, added double margins to floating page elements. For example, when adding "margin: 0px 0px 0px 50px" to a floating element in CSS, IE would double the size of the left margin, making the value 100 pixels instead of 50 pixels. Doubling the margins would throw off the alignment of one or more elements in the page, and you couldn't change the left margin to 25 pixels, since other browsers like Mozilla Firefox don't double the margins. To fix a double margin in IE, edit the code for all floating elements.
Instructions
-
-
1
Insert "<style>" and "</style>" between the "<head>" tags:
<head>
<style>
</style>
</head> -
2
Insert "div { display: inline; }" in between the "<style>" tags. Use this code only if all of the div elements in the page use the "float" attribute. The code should look like the following:
<style>
div { display: inline; }
</style> -
-
3
Press "Ctrl" and "F" to open "Find" if not all of the div elements in the page use the "float" attribute. Type "float" into the search box, then press "Enter" to search for all elements using that attribute.
-
4
Insert "display: inline;" in between the curly braces of elements in the CSS code that use "float."For example:
<style>
.box1 { float: left; display: inline; }
</style> -
5
Insert "display: inline" in HTML tags that use the "float" attribute. For example:
<div class="box" style="float: left; display: inline">
-
1