如何使標題覆蓋內容並跨越整個頁面長度?當我使用這個CSS如何使頁眉覆蓋整個頁面的長度?
#header {
display: inline-block;
background-color: #015367;
}
#login {
color: #b92c2c;
font-size: 1.25em;
margin-left: 18em;
position: relative;
top: 16px;
text-decoration: none;
}
#search-form {
margin-left: 0.5em;
margin-right: 15em;
position: relative;
top: 18px;
}
.lfloat {
float: left;
}
.rfloat {
float: right;
}
與這個網站
<body>
<div id="header">
<div id="page-nav" class="rfloat">
<a id="login" class="lfloat" href="/login">login</a>
<form id="search-form" class="rfloat" action="search.py" method="get">
<input id="searchbox" type="text" name="q" placeholder="search"/>
</form>
</div>
</div>
</body>
我得到這樣的結果(在Firefox)
什麼我需要改變,以得到適當的標題(如計算器,臉譜等)?
您是否需要頁眉跨越頁面長度或包含登錄表單? – j08691 2013-02-08 20:34:08
兩者。現在標題並沒有碰到頁面邊緣 – bab 2013-02-08 20:50:54