2012-03-06 2 views
0

Здравствуйте, мне нужно центрировать мое подменю ширины 1000 пикселей на страницу.Подменю CSS-центра Wordpress

Я считаю, что моя проблема заключается в:

position: absolute; 
    top: 23px; 
    left: 50%; 

Сайт: http://dev.timson.me (Подменю на "Предстоящие" & "Past Productions")

И в CSS является:

#access { 
    clear: both; 
    display: block; 
    float: left; 
    margin: 0 auto 6px; 
    padding-top: 8px; 
    width: 100%; 
    font-family: Stag; 
    display:block; 
    text-align:center; 
} 

#access ul { 
    font-size: 13px; 
    list-style: none; 
    margin: 0 0 0 -0.8125em; 
    padding-left: 0; 

    display:inline-block; 
} 

.sub-menu { 
    text-align: center; 
} 

#menu-default > li { 
    float: left; 
    position: relative; 
} 
.sub-menu > li { 
    display: inline-block; 
} 

#access a { 
    color: #eee; 
    display: block; 
    line-height: 25px; 
    margin-top: -4px; 
    margin-bottom: -4px; 
    padding: 0 1.2125em; 
    text-decoration: none; 
} 

#access ul ul { 

    display: none; 
    float: left; 
    margin-top: 0; 
    position: absolute; 
    top: 23px; 
    left: 50%; 
    width: 1000px; 
    z-index: 99999; 
    margin-left:-500px; 
    text-align:center; 
    padding-top:5px; 
    padding-bottom:10px; 

    background: red; 
} 

#access ul ul a { 

    margin-top: 0px; 
    margin-right: auto; 
    margin-bottom: 0px; 
    margin-left: auto; 
    padding-bottom:10px; 

} 

#access ul li:hover > ul { 
    display: block; 
} 

Любая помощь очень ценится.

Приветствия, Peter

ответ

0

Попробуйте удалить position: relative; из вашей главной навигации #menu-default > li и добавьте position: relative; к основному #access ul

+0

Thankyou очень много работал как шарм :) – ptimson

+0

удивительным! рад, что сработал :) – blackpla9ue

Смежные вопросы