2013-04-20 59 views
2

我不断收到不需要的顶边和不能删除它,我试了一切,这也影响了我的其他项目之一,可以找到任何解决方案。请帮助 继承人我的html:为什么我在我的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; 

} 
+0

是有这个网站的真人版?检查具有边距和/或填充的h1,2,3或p元素。情况可能如此。 – 2013-04-20 00:20:20

+0

帮你一个忙,并学习如何在你喜欢的浏览器中使用检查员。处理代码并找到解决此类问题的罪魁祸首非常简单。 – 2013-04-20 02:44:07

+0

而且您可能想了解有关reset.css或normalize.css的信息http://meyerweb.com/eric/tools/css/reset/ http://necolas.github.io/normalize.css/ – 2013-04-20 02:45:29

回答

5
#topBanner h2{ 
    margin:0px; 
} 

这应该解决它;)

+0

@brunochaters谢谢SOOOO很棒;你刚刚保存了2个我的主要项目....我会问你是如何弄清楚的?我的网站上的 – jshariar 2013-04-20 00:27:12

+0

www.datamaia.pt,joomla在p里面添加了图片,横幅总是有边距,我花了一个星期左右的时间搞乱了Chrome和Mozilla特定的CSS,毕竟这只是它。我修改了我的answear,因为它是正确的。代表它是否有帮助 – 2013-04-20 00:33:00

相关问题