好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CSS布局菜单的问题_html/css_WEB-ITnose

本帖最后由 sen_linzhiwang 于 2012-10-05 12:46:12 编辑

问题描述:
共有三层菜单,CSS代码如下:
#levelone {/* 第一层菜单li */	float: right;}#levelone a {/* 第一层菜单li下的a */	width: 70px;	height: 70px;	padding-left: 2px;	padding-right: 2px;	display: block;	line-height: 20px;	border: 0px;	margin: 0px;	text-align: center;	font-size: 15px;}#levelone_value {/* 第一层菜单li下的a中的DIV,用于展示文字,让文字显示在a区域的下方剧中。 */	padding: 0px;	border: 0px;	margin: 0px;	position: relative;	top: 50px;	text-align: center;}#levelone ul {/* 第二层菜单的ul */	position: relative;	padding: 0px;	border: 0px;	margin: 0px auto;	display: none;	left: 3px;	width:120px;	border-top: 1px solid white;}#levelone ul li {/* 第二层菜单的ul下的li */	float: none;	display: inline;}#levelone ul li a {/* 第二层菜单的ul下的li中的a */	width: 120px;	height: 15px;	position: relative;	left: 0px;	background: #A9C251;	color: #24313C;}#levelone ul li ul {/* 第三层菜单 */	position: relative;	padding: 0px;	border: 0px;	margin: 0px;	display: none;	left: 120px;	top: 0px; 	/* width: 120px; */}#levelone ul li ul li {/* 第三层菜单 */	float: none;	display: inline;}#levelone ul li ul li a {/* 第三层菜单 */	width: 120px;	height: 15px;	background: #A9C251;	color: #24313C;} 


问题:1、当第二层菜单的宽度超过第一层的宽度时,第一层菜单会向左移动,直到能显示第二层菜单的所有内容为止。如何设置第一层菜单,让第二层菜单超过第一层菜单时,第一层菜单不移动?
2、当第二层菜单设置了宽度时,并且设置第三层菜单显示在第二层菜单的最右边时,在FF中看上去没有什么问题,但是在IE中,超过第二层宽度的问题不会显示出来。如果设置第二层的宽度为auto,那显示的时候,第一层菜单移动弧度更大。如何在设置第二层菜单宽度的情况下,使第三层菜单能够全部显示出来?
谢谢!
如果我没有把问题描述清楚,请说出来。
再次谢谢!


回复讨论(解决方案)

更正第二个问题中的两个字:
但是在IE中,超过第二层宽度的问题(问题 改为:部分)不会显示出来。

没有高手来指点一二吗?求高手!

求高手!!!!

楼主可以上网搜索下三级导航条菜单,看下人家怎么写的,可能就会知道自己错在哪里了。

可以把代码发全吗??

可以把代码发全吗??
你已经帮我解决好几个问题了,谢谢你!
我现在在公司,不在家。我晚上回去了把生成菜单的代码jsp帖出来。





">
style="background-image: url(' /v1/images/sys_ .gif');background-repeat: no-repeat;">



查看更多关于CSS布局菜单的问题_html/css_WEB-ITnose的详细内容...

  阅读:22次