2012-03-17 23 views

回答

1

嘗試使用下面的結構並調整<div class="headerNav"></div>的填充因爲上面的元素具有float:left屬性並且您正在使用padding-top:148px;在IE7中,與其他瀏覽器相比,填充是在headerNav內部應用的。

在其他瀏覽器中,填充是從視口頂部應用的。

<div class="headerText"></div> 

    <div style="clear:both"></div> <!--this will clear the floating property for below elements and make the space and adjust all the elements below this div --> 

<div class="headerNav"></div> 

在下圖(IE7)中,您可以看到填充頂部:148;在身體的頂部不是從身體的頂部應用。

enter image description here

參見填充頂:148px從主體/視口的頂部施加。在下面的圖像(火狐)

enter image description here

+0

我嘗試添加了兩個清晰的div和它沒有工作:( – user1269625 2012-03-17 05:39:12

+0

看到你正面臨着在這裏截屏的實際問題,我試着填充頂:48像素;它是在IE7中給出輸出需要您可以使用條件註釋併爲IE7編寫單獨的css – w3uiguru 2012-03-17 05:41:43

+0

條件註釋?我從來沒有聽說過這個,你有沒有例子或教程? – user1269625 2012-03-17 06:04:40