Thursday, April 21, 2011

[CSS] Margin display disparity between IE7 and FF3

Hi everyone:

Refer to HTML, CSS below.

Why the margin-bottom will not reflect in IE7, but in FF3? Is there any workaround for it?

Notice that I set margin: 50 in CSS.

<body style="background-color:#fff">
<div class="window">
  d-window
</div>

CSS:

body{margin:10px;padding:0;background-color:#1e1e1e;color:#ddd; border: 1px solid #000000}
.window { width:280px; clear:both; margin: 50px; border: 1px solid #000000}

Thanks

From stackoverflow
  • use a #container div instead of the body and use float on the container but not the .window class that should solve the problem.

0 comments:

Post a Comment