Why is the wrapper div getting the top margin applied when applying to its child div?
Here is an example html:
<div id = "wrapper">
<div id = "content">
</div>
</div>
here is the CSS:
#wrapper
{
width: 1000px;
min-height: 850px;
开发者_StackOverflow中文版 border: 1px solid;
}
#content
{
height: 450px;
float: left;
margin: 50px 0px 0px 0px;
}
So when you look in the browser, the wrapper div is getting the margin applied to it? why is that?
have you removed the margin in the body tag?
<body marginheight="0" marginwidth="0">
精彩评论