這是我的頁面頁眉,它有一個選擇菜單,並且必須位於背景圖像的頂部,如何在屏幕分辨率更改時將其固定在位置?無論屏幕分辨率是否爲
看看
這裏更大的分辨率
的HTML如下所示:
<div class="header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 16px 10px 0 52px ;text-align: right; width: 230px; background: url('images/searchbar_dropdown.png') no-repeat scroll 72px 15px transparent;">
<select id="dept" name="dept" type="text" style="background-color: white; border: 2px solid rgb(182, 109, 49); width: 150px; height: 35px; opacity: 0;"><option></option>
</select></div></td>
<td rowspan="2" style="width: 2px;"> </td>
</tr>
</table>
</div>
和頭部CSS
.header {
background: url("../../images/background.png") repeat;
position: fixed;
color: white;
min-height: 65px;
padding: 5px 5px;
margin: 0;
}
的一個好方法是使用百分比,而不是常量... –
@TiagoSalzmann不要slilly現在請.... –