2012-05-09 51 views
0

有人能幫我對準我的導航中心請導航不會居中

http://sketchedneo.com/Example.php

我已經試過

左:25%;

對齊:中心;

對準調整:中部;

它只是似乎並不想去中間。

任何建議都非常讚賞

div#navigation{ position: absolute; 
padding-top:-100px; 
    border-radius: 4px; 


} 

#navigation ul { 
    padding:5px 1px 1px 1px; 
    margin: 0; 
    list-style: none; 
    float:left; text-align:left; 
} 
#pad{padding:0px 0px 0px 70px;} 
#navigation li { 
    float: left; 
    position: relative; 


} 

#navigation ul li a{ 
    display:block; 
    padding:5px 1px 1px 1px; 
    margin:0px; 
font-family: Verdana, Geneva, sans-serif; 
    font-size: 12px; 
    text-decoration: none; 
    white-space:nowrap; 

} 


#navigation ul ul{ 
    position:absolute; 
    top:-99999px; 
    left:0; 
    opacity: 0; /* Hide sub level */ 
    -webkit-transition: opacity .5s ease-in-out; 
    -moz-transition: opacity .5s ease-in-out; 
    -o-transition: opacity .5s ease-in-out; 
    z-index:497; 
    background:#95cfff; 
    padding: 2px; border:1px solid #000000; border-top:1px solid #000000; 
    border-bottom-left-radius:6px; 
    border-bottom-right-radius:6px; 
} 
#navigation ul ul ul { 
    position:absolute; 
    top:-99999px; 
    left:100%; 
    opacity: 0; /* Hide sub level */ 
    -webkit-transition: opacity .5s ease-in-out; 
    -moz-transition: opacity .5s ease-in-out; 
    -o-transition: opacity .5s ease-in-out; 
    z-index:497; 
    background:#a1e8dc; 
    padding: 2px; border:1px solid #000000; 
    border-top-left-radius:6px; 
    border-top-right-radius:6px; 
    border-bottom-left-radius:6px; 
    border-bottom-right-radius:6px; 
} 
#navigation ul li:hover>ul{ opacity: 1; position:absolute; top:99%; left:0; } 
#navigation ul ul li:hover>ul{ position:absolute; top:0; left:100%; opacity: 1; z-index:497; background:#95cfff; } 

    #navigation a:link,#navigation a:visited, #navigation a:active { 
    color: #002b4f; 
    font-weight: normal; 
    text-align: center; 
    text-decoration: none; 
} 

#navigation a:hover { 
    color: #0059d2; 
    font-weight: normal; 
    text-align: center; 
    text-decoration: none; 

} a.top:link, a.top:visited, a.top:active { 
    color: #002b4f; 
    font-weight: normal; 
    text-align: center; 
    text-decoration: none; 
} 

回答

0

我已經在過去的幾個時間使用這個傢伙的技術和它的偉大工程:

http://pmob.co.uk/pob/centred-float.htm

+0

即處理不當的工作, – user1348927

+0

我剛剛訪問了您的網站和您的導航似乎集中。你還需要幫助嗎? – Lee

+0

我做了保證金:汽車;在左邊和右邊 – user1348927