1

不要なトップマージンを取得し続け、それを削除することはできません. 私のhtmlを助けてください:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Joy The Designert</title>
<link href="style1.css" rel="stylesheet" type="text/css" />
</head>

<body topmargin=0 marginheight=0>
<div id="Wrapper">
<div id="topBanner"><div class="container"><h2>top banner content</h2></div></div>
<div id="nav"><div class="container">Navigation Text<?include ("navigation.php");?></div></div>
<div id="featured"><div class="container"></div></div>
<div id="info"><div class="container">test</div></div>
<div id="support"><div class="container">test</div></div>
<div id="footer"><div class="container">testing footer<?include ("footer.php");?></div></div>
</div>
</body>
</html>

そして、私のcssコンテンツは次のとおりです。

   @charset "utf-8";
/* CSS Document */
html {
    margin:!important 0px;
    padding:0px;
}
body {
    margin-top:!important 0px;
    margin-left:0px;
    margin-right:0px;
    margin-botton:0px;
    padding:0px;
    border:none;
    color: #292929;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 81.25%;

}
#wrapper {
    margin:0px;
    Width:1000px;
    height:auto;

}
.container {
    width:900px;
    margin:auto;

}
#topBanner{
    background-image:url(images/scr_gray-bkgd.png);
    background-repeat:repeat-x;
    height:44px;
    width:100%;
}
#nav{
    height:72px;
    width:100%;
    padding
    color:#666666;
    background-color: #F5F5F5;
    border-bottom: 1px solid #FFFFFF;
    box-shadow: 0 -5px 5px #5A595D;
    color: #666666;
    font-weight: bold;
    height: 72px;
}
#featured {
    min-height:420px;
    width:100%;
    background: url(none) no-repeat scroll center top #ECECEC;
    border-bottom: 1px solid #FFFFFF;
}

#info{

    background: url(images/gradient-bg.png);
    background-repeat:repeat-x;
    height: 256px;
    width: 100%;

}
#support{
    background-color: #F5F5F5;
    border-top: 1px solid #FFFFFF;
    box-shadow: 0 5px 5px #5A595D;
    height:55px;
    width:100%;
    }
#footer{
    width:100%;
    height:150px;
    background-image:url(images/scr_gray-bkgd.png);
    background-repeat:repeat;

}
4

1 に答える 1

5
#topBanner h2{
    margin:0px;
}

これで解決するはずです;)

于 2013-04-20T00:22:30.477 に答える