这是我的页面页眉,它有一个选择菜单,并且必须位于背景图像的顶部,如何在屏幕分辨率更改时将其固定在位置?无论屏幕分辨率是否为
看看
这里更大的分辨率
的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现在请.... –