in Advanced 

Question preview

HomeQuestion preview:
Log in

Strange margin-bottom in IE7

I'm trying to give margin-top:50px to one of the divs, but in IE7 I get and bottom margin of 50px.
What is the reason for that? I works fine in all other major browsers.
How I should fix this?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <style>
		.fl {
			FLOAT: left;
		}

		.fr {
			FLOAT: right;
		}

		.mt50 {
			MARGIN-TOP: 50px;
		}

		.fline {
			CLEAR: both;
			BORDER: #ccc 1px solid;
			BACKGROUND: #f6f6f6;
			HEIGHT: 10px;
		}
	</style>
</head>

<body>
    <div class="mt50">
        <div class="fl">
		qqq
        </div>
        <div class="fr">
		aaa
        </div>
    </div>
    <div class="fline"></div>
</body>
</html>


Do you know someone who could answer? Ask him for help
Answers: 1
Sort by: date rating
image alexander
14:53/19.10.2009
-
The best way to fix it is to give a padding instead of margin.
Vote:
Please vote! Your opinion matters!
If you haven't found what you've looking for, post a question
Ask question
Related questions:
| Home | Hall of fame | Registration | Log in | Terms of service | Privacy policy | Help | Contacts | RSS |