2013-10-04 166 views
1

我是一個編碼相對新手,但我建立一個朋友的Tumblr看起來像一個專業的網站。導航欄鏈接偏斜

導航欄是唯一給我帶來麻煩的東西。我將它定位得很好,並且我創建了一個圖像映射5種不同的方式,但每次都會將鏈接向左傾斜,而我不能,因爲我一生都在指出問題所在。

下面是映射代碼:

<div style="display:block; width:2819px; height:242px; background:url(http://25.media.tumblr.com/ebc94124ba5998d21de08ddcb2e49a2c/tumblr_mtyjp4OLQH1sw93yro1_1280.png); position:absolute; margin:0px 0px; background-repeat: no-repeat;"> 
<map id="imgmap20139301813" name="imgmap20139301813"><area shape="rect" alt="" title="" coords="471,63,510,80" href="http://davidallanhowell.tumblr.com/homepage" target="_self" /><area shape="rect" alt="" title="" coords="541,63,590,79" href="http://davidallanhowell.tumblr.com/resume" target="_self" /><area shape="rect" alt="" title="" coords="622,63,662,79" href="http://davidallanhowell.tumblr.com/media" target="_self" /><area shape="rect" alt="" title="" coords="691,64,735,79" href="http://davidallanhowell.tumblr.com/studio" target="_self" /><area shape="rect" alt="" title="" coords="765,63,817,79" href="http://davidallanhowell.tumblr.com/contact" target="_self" /></map> 
</style> 

未露面,直到我試圖修復它的第二個問題,現在我已經在圖像上運行難看的灰色條爲好。

Here's the full site.

幫助?

感謝並提前道歉可能是一個明顯的問題。

回答

0

不好意思說出來,但是你的代碼有點亂!

爲什麼不刪除圖像映射,並從圖像鏈接和使用html元素呢?

這段代碼,我打算給你這是一個很好的開始,讓你在它上面工作!

<div style="display:block; width: 100%; height:242px; background:url(http://25.media.tumblr.com/ebc94124ba5998d21de08ddcb2e49a2c/tumblr_mtyjp4OLQH1sw93yro1_1280.png); position:absolute; margin:0px 0px; background-repeat: no-repeat;"> 
    <ul style=" 
    width: 361px; 
    height: 17px; 
    margin: 62px auto 0 auto; 
    border-bottom: 2px solid rgba(0,0,0,0.1); 
"> 
     <li style=" 
    float: left; 
    margin: 0 15px; 
">home</li> 
     <li style=" 
    float: left; 
    margin: 0 15px; 
">resume</li> 
     <li style=" 
    float: left; 
    margin: 0 15px; 
">media</li><li style=" 
    float: left; 
    margin: 0 15px; 
">studio</li> 
     <li style=" 
    float: left; 
    margin: 0 15px; 
">contact</li> 
    </ul> 
</div> 

希望有所幫助,而且任何問題只是問!

+0

非常感謝!哈哈,是的,我可以說這是一團糟。我砍了很多。仍然有一些錯誤,但我無法弄清楚。 ; D – user2832886

+0

OH!其實我還有一個問題,對不起。新欄杆看起來不錯,但它現在與頁面一起滾動,並且鏈接之間有一些子彈,我似乎可以在腳本中查明。另外,您是否碰巧知道腳本保持在頂部,以便頁面上的帖子向下滾動? – user2832886

+0

添加位置:固定; top:0; z-index:100;到div。並刪除項目符號添加列表樣式:無;到ul – Tomahock