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;
}
4

1 回答 1

0

我过去几次使用过这个人的技术,效果很好:

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

于 2012-05-09T23:44:50.887 回答