проблема с выпадающим меню
-
в общем у меня проблема с выпадающем меню
1 случай. если делаю две подменю меню то получается вторая подменю переносится на 2 строки и её не видно(подменю)
http://clip2net.com/clip/m0/1357388137-clip-5kb.png2. если делаю три и более подменю меню то всё нормально
http://clip2net.com/clip/m0/1357388361-clip-8kb.pngподскажите как иправить эту ерунду в первом случае чтоб подменю не переносилась на 2 строки?
меню
<ul id="nav"> <li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Главная</a></li> <?php wp_list_categories('depth=3&exclude=1&hide_empty=0&orderby=name&show_count=0&use_desc_for_title=1&title_li='); ?> </ul>
CSS
/* Based partially on Matthew Carroll's keyboard accessible flavor of Suckerfish * Dropdowns by Patrick Griffiths and Dan Webb. * http://carroll.org.uk/sandbox/suckerfish/bones2.html */ /* ----[ LINKS ]----*/ /* all menu links */ #nav a, #subMenusContainer a { text-decoration:none; display:block; } /* состояние кнопки в покое*/ #nav a { margin:0; float:left; background: none; padding:15px 15px 15px 15px; color: #d9d9d6; font-weight: bold; text-transform: uppercase; font-size: 12px; border: 1px solid #1F2025; } /* выпадающее меню */ #subMenusContainer a, #nav li li a { color: #d9d9d6; font-size: 12px; text-align:left; background-color:#1F2025; padding:6px 26px; } /* состояние кнопки при наведений */ #nav li a:hover, #nav li a:focus, #nav a.mainMenuParentBtnFocused{ background: #d9d9d6; color:#000000; border: 1px solid #d9d9d6; } /* состояние выпадающего меню при наведений*/ #subMenusContainer a:hover, #subMenusContainer a:focus, #subMenusContainer a.subMenuParentBtnFocused { background: #d9d9d6; color:#000000; } /* Parent Sub Menu Links ---[javascript users only]*/ .subMenuParentBtn { background: url(../img/arrow_right.gif) right center no-repeat; } /* Parent Sub Menu Links on hover or focus ---[javascript users only]*/ .subMenuParentBtnFocused { background: url(../img/arrow_right_over.gif) right center no-repeat; } /* Parent Main Menu Links ---[javascript users only]*/ .mainMenuParentBtn { /*background: url(../img/arrow_down.gif) right center no-repeat;*/ } /* Parent Main Menu Links on hover or focus ---[javascript users only]*/ .mainMenuParentBtnFocused { /*background: url(../img/arrow_down_over.gif) right center no-repeat;*/ } /* ----[ OLs ULs, LIs, and DIVs ]----*/ /* Submenu Outer Wrapper - each submenu is inside a div with this class - javascript users only */ .smOW { display:none; position: absolute; overflow:hidden; /*the 2px left & right padding lets you have a 1px border on the ul or ol inside since overflow is set to hidden*/ padding:0 2px; margin:0 0 0 -2px; } /* All ULs and OLs */ #nav, #nav ul, #nav ol, #subMenusContainer ul, #subMenusContainer ol { padding: 0; margin: 0; list-style: none; line-height: 1em; } /* All submenu OLs and ULs */ #nav ol, #nav ul, #subMenusContainer ul, #subMenusContainer ol { /*border around submenu goes here*/ background: none; left:0; } /* List items in main menu --[for non-javascript users this applies to submenus as well] */ #nav li { /*great place to use a background image as a divider*/ cursor: pointer; float: left; margin: 0 2px 0 0; padding: 0 2px 0 4px; height: 44px; display: inline; background: url(../images/nav-separator.png) left center no-repeat; } #nav li:first-child { background: none; padding: 0 2px 0 0; } #subMenusContainer li { list-style: none; } /* main menu ul or ol elment */ #nav { width: 940px; margin: 0 auto; clear: both; overflow: hidden; font-size: 12px; display: block; } #nav .children{ display: none; } #subMenusContainer { display:block; position:absolute; top:0; left:0; width:100%; height:0; overflow:visible; z-index:1000000000; }
Просмотр 3 ответов — с 1 по 3 (всего 3)
Просмотр 3 ответов — с 1 по 3 (всего 3)
- Тема «проблема с выпадающим меню» закрыта для новых ответов.