• Вопрос по верстке многоуровнего меню без JS.?

    @losttheory Автор вопроса
    Угу. Когда пробую класс .arrow-left добавлять для li вместо a, то получается ерунда, откуда-то лишние отступы появляются.
  • Вопрос по верстке многоуровнего меню без JS.?

    @losttheory Автор вопроса
    .menu {font-size:14px;padding:0px; float:left; width:890px;}
    /* remove all the bullets, borders and padding from the default list styling */
    .menu ul {padding:0;margin:0;list-style-type:none; height:35px;}
    /* style the sub-level lists */
    .menu ul ul {width: auto;}
    /* float the top list items to make it horizontal and a relative positon so that you can control the dropdown menu positon */
    .menu ul li {float:left;height:35px;line-height:35px;}
    /* style the sub level list items */
    .menu ul ul li {display:block;width: auto;height:auto;position:relative;line-height:1em;}
    /* style the links for the top level */
    .menu a, .menu a:visited {display:block;float:left;height:100%;font-size:14px;text-decoration:none;color:#545554;padding:0 3px 0 3px; margin:0 30px 0 0;}
    .menu a.current{ background-color:#FFFFFF;}
    /* style the sub level links */
    .menu ul ul a, .menu ul ul a:visited {display:block;font-size:12px; text-align:left; color:#545554;width:200px;height:100%;line-height:1.5em; padding:9px 0 9px 12px; border-bottom:1px #ebebeb solid;background-color:#fff; font-weight:normal;}
    .menu ul table ul a, .menu ul table ul a:visited {width:14em; width:12em;}
    /* style the table so that it takes no part in the layout - required for IE to work */
    .menu table {position:absolute; left:0; top:0; font-size:1em; z-index:-1;}
    .menu ul ul table {left:-1px;}
    .menu ul ul table ul.left {margin-left:2px;}
    .menu li:hover {position:relative;}
    * html .menu a:hover {position:relative;}
    /* style the sub level 1 background */
    .menu ul :hover a.sub1 {background:#fff;}
    /* style the sub level 2 background */
    .menu ul ul :hover a.sub2 {background:#fff;}
    /* style the level hovers */
    /* first */
    .menu a:hover {color:#850336;}
    .menu :hover > a {color:#850336;}
    /* second */
    .menu ul ul a:hover{background-color:#850336; color:#FFFFFF;}
    .menu ul ul :hover > a {background-color:#850336; color:#FFFFFF;}
    /* hide the sub levels and give them a positon absolute so that they take up no room */
    .menu ul ul {visibility:hidden;position:absolute;height:0;top:35px;left:0;width:14em; border:none; z-index:9999; background-color:#FFFFFF;}
    /* position the third level flyout menu */
    .menu ul ul ul{display:none; left:15em;top:0;width:14em;}
    /* position the third level flyout menu for a left flyout */
    .menu ul ul ul.left {left:-14em;}
    /* make the second level visible when hover on first level list OR link */
    .menu ul li:hover ul, .menu ul a:hover ul {visibility:visible; height:auto; padding-bottom:3em; background:transparent url(images/trans.gif);}
    .menu ul ul li:hover>ul {display:block;}
    .menu .arrow-down {background: url('images/arrows.png') no-repeat right -50px; padding-right: 5px; margin-right: 7px;}
    .menu .arrow-down:hover {background: url('images/arrows.png') no-repeat right -82px;}
    .menu .arrow-left-2 {background:#fff url('images/arrows.png') no-repeat 193px 22px;}
    .menu .arrow-left {background:#fff url('images/arrows.png') no-repeat 193px 14px;}
    .menu .arrow-left:hover {background:#850336 url('images/arrows.png') no-repeat 193px -18px;}