我在尝试完成这个模拟网站时感到非常沮丧,所以我爬到你们这里寻求帮助。我现在有两个问题。首先,每当我打开 Firebug 来检查我的代码时,我的全白内容包装器背景就会不断被推高。其次,我的内容包装器白色背景不包括我在 Firefox 中的页脚。在 IE 中,它包含了大部分内容,但不是 100%。切断一行文本。任何帮助将不胜感激。
html,body {height:100%;width:100%;}
html,body,#End {margin:0;padding:0;}
body {
text-align: center;
position:absolute;
}
Content_Wrap {
text-align: left;
width: 864px;
margin: 0 auto;
height:100%;
background-color:#FFF;
}
address{
font-family:'Advent Pro', sans-serif;
font-size:14px;
float:left;
color:#195a80;
height:100px;
width:auto;
}
copyright{
font-family:'Advent Pro', sans-serif;
font-size:14px;
float:right;
color:#195a80;
height:40px;
width:auto;
}
footer{
height:300px;
width:inherit;
float:left;
}
地址和版权位于页脚内,而除了我的结尾 div 之外的所有内容都位于内容包装内。当我使用 Firebug 检查时,它会在包装内显示页脚。
链接到我正在制作的模型。 http://ninjasquared.com/LWM/
最佳答案
从 #Content_Wrap
中删除 height:100%
并让 wrapper 填充它。将 overflow: hidden;
添加到 #Content_Wrap
将为您带来一些技巧!
只需将您的 #Content_Wrap
替换为:
CSS:
#Content_Wrap {
background-color: #FFFFFF;
margin: 0 auto;
overflow: hidden;
text-align: left;
width: 864px;
}
希望对你有帮助!
关于css - CSS 样式的内容包装器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21618967/