2011-10-27 100 views
0

我有這個導航,它沒有顯示在我想要的位置。導航CSS/HTML

http://jamessuske.com/thornwood2/

我想有它旁邊右側的標誌,由於某種原因,它顯示了對在最高層的權利。 (有點兒很難描述,但是我相信一旦你看到它,你也會知道我在說什麼)

HTML代碼

<div class="header"> 

<div class="logo"> 
<img src="images/logo.jpg" width="350" height="120" border="0" /> 
</div><!--logo--> 

<div class="nav"> 
Home | About Us | Gallery | Contact Us 
</div><!--nav--> 

</div><!--header--> 

CSS代碼

.header{ 
width:1009px; 
} 

.logo{ 
float:left; 
width:350px; 
} 

.nav{ 
float:right; 
width:260px; 
color:#FFF; 
} 

而且同時我在這裏在IE 7存在topConent和含量 - 之間的間隙,也和含量 - bottomContent

http://jamessuske.com/thornwood2/

之間

HTML代碼

<div class="topContent"> 
<img src="images/top.gif" width="1009" height="37" border="0" /> 
</div><!--topContent--> 

<div class="leftContent"> 
<img src="images/leftSide.gif" width="48" height="494" border="0" /> 
</div><!--leftContent--> 

<div class="contentArea"> 

</div><!--contentArea--> 

<div class="rightContent"> 
<img src="images/rightSide.gif" width="49" height="494" border="0" /> 
</div><!--rightContent--> 

<div class="bottomContent"> 
<img src="images/bottom.gif" width="1009" height="39" border="0" /> 
</div><!--bottomContent--> 

有任何問題的任何幫助,將不勝感激。

感謝

+0

糟糕忘記爲IE7錯誤 – user979331

+0

CSS代碼CSS代碼 .topContent { \t寬度:1009px; } .leftContent { \t浮動:左; } .contentArea { \t背景:#FFF; \t width:912px; \t min-height:494px; \t float:left; } .rightContent { \t浮動:右; } .bottomContent { \t寬度:1009px; } – user979331

回答

1
.nav { float:left; } 
如果你想讓它旁邊的圖片

。如果你想要它在右邊,但進一步下來 - 只是裁剪你的照片。它頂部有一些空白,或者添加margin-top:20px左右。

IE7 bug 由於bug需要從每張圖片和div中刪除填充和邊距,所以每個div都應該這樣做。

.top-content 
{ 
padding:0px;margin:0px; 
} 
.top-content img 
{ 
padding:0px;margin:0px; 
} 
+0

以及我還是希望它在右邊,剛下來,所以它在同級別的標誌 – user979331

+0

添加保證金它.nav {邊距:10px的;} –

+0

刪除了頂部的填充和保證金和底部圖像不起作用,IE 7 – user979331