我正在尝试使我的模板正常工作,并且我有一个测试页,以便您可以看到意外情况。
http://merkd.com/gtamoney

页眉消失在页面的右上角,但页眉底部的页眉边框似乎不受影响,并贯穿了整个页面。我的CSS在下面;我将#header#headerBorder放在顶部,但是我还为标头中的所有对象包括了CSS的其余部分,以防它们相关。

#headerBorder {
display: block;
position: fixed;
z-index: 99;
top: 3.0em;
width: 100%;
height: 0.5em;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top,  #ffffff 0%, #cccccc 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #ffffff 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #ffffff 0%,#cccccc 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #ffffff 0%,#cccccc 100%); /* IE10+ */
background: linear-gradient(to bottom,  #ffffff 0%,#cccccc 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */

}

#header {
position: fixed;
width: 100%;
top: 0;
z-index: 100;
left: 0;
background-color: #FFFFFF;
height: 3.0em;
}
#header #logo {
position: fixed;
left: 3.0em;
top: 0.4em;
width: 7.25em;
height: 3.0em;
}
#header a {
display: block;
float: right;
height: 2.25em;
font-size: 0.9em;
text-decoration: none;
font-weight: 600;
color: #777777;
text-transform: uppercase;
letter-spacing: 0.01em;
margin: 0.15em 0 0 2.5em;
padding: 1.25em 0.5em 0.2em 0.5em;

transition: color 0.30s ease-in-out;
-o-transition: color 0.30s ease-in-out;
-moz-transition: color 0.30s ease-in-out;
-webkit-transition: color 0.30s ease-in-out;
} #header a:last-of-type { margin-left: 0; }

#header a:hover {
color: #000000;
}

#header div {
float: right;
margin: -0.1em 2.0em 0 0;
}

#header div a {
margin: 0;
}

#header div a img {
width: 1.5em;
height: 1.5em;

opacity: 0.6;
margin: 0;
}

#header div a:hover img {
opacity: 1.0;


transition: opacity 0.30s ease;
-o-transition: opacity 0.30s ease;
-moz-transition: opacity 0.30s ease;
-webkit-transition: opacity 0.30s ease;
}

最佳答案

去掉

#header { right: 10em; }


来自alpha.header.css

关于html - 页眉消失在页面右侧,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23524377/

10-12 05:56