English 中文(简体)
在现有社会保障局菜单中增加一个职等
原标题:Add one more level to an existing CSS menu
  • 时间:2011-10-06 15:24:32
  •  标签:
  • html
  • css
  • menu

地雷之友有一个网站,并请我对此作一些修改。 问题在于有CSS的菜单(2级),我想把它定为3级菜单。

这里为菜单提供社会保障

#nav{position:absolute;right:0px;bottom:0}
#nav a{height:23px;margin:0 0 0 1px;padding:7px 11px 0 12px;font-weight: lighter; font:14px helvetica,arial;color:#FFF;text-align:center;display:block;float:left}
#nav div{float:left}
#nav .hot{color:#fff;background:url(../images/nav-up-hot.png)}
#nav a:hover,#nav .aboutHover .button{background:url(../images/nav-up.png); color:#333; 
       /* Theoretically for IE 8 & 9 (more valid) */
        /* ...but not required as filter works too */
        /* should come BEFORE filter */
        -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";

        /* This works in IE 8 & 9 too */
        /* ... but also 5, 6, 7 */
        filter: alpha(opacity=70);

        /* Older than Firefox 0.9 */
        -moz-opacity:0.7;

        /* Safari 1.x (pre WebKit!) */
        -khtml-opacity: 0.7;

        /* Modern!
        /* Firefox 0.9+, Safari 2?, Chrome any?
        /* Opera 9+, IE 9+ */
        opacity: 0.7;

}
#nav ul li a:hover {color:#00b9ff}
#nav .about ul{display:none}
#nav .aboutHover ul{position:absolute}
#nav li{margin:0;padding:0;background:none !important}
#nav ul{width:180px;margin:30px 0 0 1px;*margin:30px 0 0 -120px;padding:4px 10px 4px 0;list-style:none;background: url(../images/sub-back.png);}
#nav ul a{width:100%;height:20px;padding:4px 0 0 10px !important;text-align:left;font-size:12px;font-weight:bold;color:#FFF;background:none;display:block}
#nav ul a:hover{background:none}

And the HTML code is:

<div onmouseout="className= about " onmouseover="className= aboutHover " class="about">
<a href="<?php echo get_category_link( 1 ); ?> " title="Accommodation" class="button"><strong>Accommodation</strong></a>
<ul>
    <li><a href="<?php echo $permalink = get_permalink( 200 ); ?>" title="Room 1">Room 1</a></li>
    <li><a href="<?php echo $permalink = get_permalink( 203 ); ?>" title="Room 2">Room 2</a></li>
    <li><a href="<?php echo $permalink = get_permalink( 256 ); ?>" title="Room 3">Room 3</a></li>
    <li><a href="<?php echo $permalink = get_permalink( 89 ); ?>" title="Room 4">Room 4</a></li>
    <li><a href="<?php echo $permalink = get_permalink( 45 ); ?>" title="Room 5">Room 5</a></li>
</ul>
</div>

我尝试了许多,搜索了因特网,但我无法找到如何增加新水平的解决办法。

现为:

Accomodation
L Room 1
L Room 2
L Room 3
L Room 4
L Room 5

想做的是:

Accomodation
      L Sea View Rooms
          L Room 1
          L Room 2
          L Room 3
      L Land View Rooms
          L Room 4
          L Room 5

感谢你们的帮助......

最佳回答

......对拖延表示担忧。 因此,我开了火(......并不确定是否打算用火吗? !) ,并检查了住宿项下的一个菜单,然后点击了ed子,并用餐。 为此:

<li>
<a title="Cave Villa Alexandros" href="http://katsekala.com/marizanv2/cave-villa-alexandros/">
    Cave Villa Alexandros
</a>

<a href="#" style="color:red; margin-left:2em;">
    Some other link
</a>

仅仅在另一个环节下添加了一条联系权,而没有将其总结为任何东西......红色只是为了可见,留有余地是它所削弱的。 如果我正确理解,你们都需要什么东西? 不是横向飞行。 自a以来,标记正在显示,你可以在必要时把左边gin放在后面。 如果这不是你所说的话,那么ler。

问题回答

......

#nav ul li ul { margin-left: 25px; }

之后再减少一个层次:

 #nav ul li ul li ul { margin-left: 25px; }




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签