当浏览器驻留时,标题背景的一部分丢失

时间:2014-02-07 08:01:05

标签: html css

Screen capture of the issue

图片中的标题分为3部分,顶部包含宽度为100%的div和背景颜色,在潜水内部有一个div作为容器,将所有元素保持在顶部。该容器的宽度为1000px,最小宽度为960px,边距为:0;

但是当你重新调整浏览器的大小并使用底部的滚动条滚动时,标题会显示如下。

我在这里做错了什么让它以这种方式呈现?

CSS

#header {
height: 120px;
width: 100%;
margin-bottom: 15px;

}

#header .nav-content-holder {
    width: 1000px;
    min-width: 960px;
    margin: 0 auto;
}

#header .header-menu-top {
    height: 20px;
    background-color: #d8d4cf;
    color: @Color-Txt-black;
}

#header .header-menu-middle {
    height: 70px;
    background-color: @Color-FM-brown;
    color: @Color-Txt-white;
}

#header .header-menu-bottom {
    border-top: 1px solid #d3d3d3;
    height: 28px;
    background-color: @Color-FM-brown;
    margin-bottom: 15px;
    color: @Color-Txt-white;
}

HTML

enter image description here

1 个答案:

答案 0 :(得分:2)

如果没有代码,就无法知道发生了什么,但你需要在身体上尝试min-width: 1040px;