标题:下拉菜单显示的问题请教中.
只看楼主
danhaoran
Rank: 1
等 级:新手上路
帖 子:224
专家分:0
注 册:2005-10-1
结帖率:100%
 问题点数:0 回复次数:0 
下拉菜单显示的问题请教中.
请教:下面的代码是一个下拉菜单,下拉菜单有三个项目,怎么才可以弄成三个项目一行显示,还有一点我不懂的是><a class="drop" href="#" target="_self">
CSS里面没有这个,怎么回事???

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<title> Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css" />

</head>


<div class="menucontainer">
<div class="menu">
<ul>
<li><a href="http://www. target="_blank">Home</a></li>
<li><a href="#" target="_self">About us</a></li>
<li><a class="drop" href="#" target="_self">Services<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
<ul class="new"><li class="new"><a href="#" target="_self">Design</a></li><li class="new"><a href="#" target="_self">Strategy</a></li><li class="new"><a href="#" target="_self">Analysis</a></li></ul></td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
</li>
<li><a href="#" target="_self">Support</a></li>
<li><a href="#" target="_self">Forums</a></li>
<li><a class="drop" href="#" target="_self">Contact Us<!--[if IE 7]><!--></a>
<!--<![endif]-->
<table><tr><td>
<ul class="new"><li class="new"><a href="#" target="_self">Design</a></li><li class="new"><a href="#" target="_self">Strategy</a></li><li class="new"><a href="#" target="_self">Analysis</a></li></ul></td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
</li>
</ul>
</div>
</div>
<!-- END Menu -->
</body>
</html>



-------------------------------------------------------------css--------------------------------------------------------
/*menu container*/
.menucontainer{background: #fff url(images/bgOFF.gif) top left repeat-x;}
/*basic menu styling*/
.menu {float:left;font-family: "Trebuchet MS",arial,verdana,sans-serif;width:100%;position:relative;font-size:11px;font-weight:bold;
background:url(images/bgOFF.gif) repeat-x;}
.menu ul {padding:0;margin:0;list-style-type:none;float:left;position:relative;}
.menu ul li {float:left;position:relative;display:inline;}

.menu ul li a, .menu ul li a:visited {float:left;display:block;text-decoration:none;color:#000;width:auto;color:#000;border:1px solid #fff;border-width:0 1px 0 0;padding:0px 16px 0px 16px;line-height:25px;}
* html .menu ul li a, .menu ul li a:visited {width:auto;w\idth:auto;}

.menu ul li ul {display:none;}

.menu ul li ul li{float:left;position:relative;display:inline;}

table {margin:-1px;border-collapse:collapse;font-size:11px;}

.menu ul li:hover a {color:#fff;background:#ccc url(images/bgON.gif) top left repeat-x;}

.menu ul li:hover ul {display:block;position:absolute;top:24px;margin-top:1px;left:0;width:100%;border-top:1px solid #fff;}

.menu ul li:hover ul li a {display:block;background:#E9E9E9;color:#000;height:auto;line-height:16px;padding:2px 16px 2px 16px;width:500px;}

.menu ul li:hover ul li a:hover {background:#896296;color:#fff;}
搜索更多相关主题的帖子: 菜单 
2009-10-09 16:50



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-287978-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.361175 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved