css - CSS 样式的内容包装器问题

标签 css

我在尝试完成这个模拟网站时感到非常沮丧,所以我爬到你们这里寻求帮助。我现在有两个问题。首先,每当我打开 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/

相关文章:

javascript - 悬停时将 flex 子级扩展到全宽

html - 仅使用 css 悬停另一个 div 时显示 div

asp.net - 向 ListView 中的 LinkBut​​ton 添加多个动态类

css - LESS mixin 返回一个自定义变量名

html - 对于 html 电子邮件,电子邮件预览中显示哪些内容?

css - Internet Explorer 负边距裁剪 div

javascript - 在可点击的文章中创建一个可点击的 div (HTML5)

javascript - CSS 显示属性未通过 JS 做出相应响应

angular - flex 容器中的响应列

html - Noob - 将文本左右对齐图像