li中嵌套ul,如何让其并排显示 15
html如下:<divid="menus"><ul><li><atarget="view_window"href="/mimodb/test.php?ID=1"><spa...
html如下:
<div id="menus"> <ul > <li ><a target="view_window" href="/mimodb/test.php?ID=1"><span >TUPScan</span></a></li> <li ><div> <ul class="gallery"> <li ><a href="http://immunet.cn/mimodb/tools/SequencesFeatures/AminoAcidAbundance1.php?ID=1"><span >Sequence Features</span></a></li> <li ><a href="http://immunet.cn/mimodb/tools/SequencesFeatures/AminoAcidAbundance2.php?ID=1"></a></li> <li ><a href="http://immunet.cn/mimodb/tools/SequencesFeatures/SequenceAbundance.php?ID=1"></a></li> </ul> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="./tools/SequencesFeatures/js/zoom.min.js"></script> </div> </li> </ul> </div>
css如下:
#menus { float:left; margin-left:12px; /*width:100%;*/ background:#f9e6a2; font-size:100%; font-weight:bold; line-height:normal; border-bottom:2px solid #DD740B; } #menus ul { margin:0; padding:24px 10px 0 80px; list-style:none; } #menus li { display:inline; margin:0; padding:0; } #menus a { float:left; background:url("/mimodb/image/tableft.gif") no-repeat left top; margin:0; padding:0 0 0 5px; text-decoration:none; } #menus a span { float:left; display:block; background:url("/mimodb/image/tabright.gif") no-repeat right top; padding:5px 15px 4px 6px; color:#FFF; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ #menus a span {float:none;} /* End IE5-Mac hack */ #menus a:hover span { color:#FFF; } #menus a:hover,#menus a.current { background-position:0% -42px; } #menus a:hover span,#menus a span.current { background-position:100% -42px; }但是显示的结果是这样,
请问该如何解决? 展开
<div id="menus"> <ul > <li ><a target="view_window" href="/mimodb/test.php?ID=1"><span >TUPScan</span></a></li> <li ><div> <ul class="gallery"> <li ><a href="http://immunet.cn/mimodb/tools/SequencesFeatures/AminoAcidAbundance1.php?ID=1"><span >Sequence Features</span></a></li> <li ><a href="http://immunet.cn/mimodb/tools/SequencesFeatures/AminoAcidAbundance2.php?ID=1"></a></li> <li ><a href="http://immunet.cn/mimodb/tools/SequencesFeatures/SequenceAbundance.php?ID=1"></a></li> </ul> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="./tools/SequencesFeatures/js/zoom.min.js"></script> </div> </li> </ul> </div>
css如下:
#menus { float:left; margin-left:12px; /*width:100%;*/ background:#f9e6a2; font-size:100%; font-weight:bold; line-height:normal; border-bottom:2px solid #DD740B; } #menus ul { margin:0; padding:24px 10px 0 80px; list-style:none; } #menus li { display:inline; margin:0; padding:0; } #menus a { float:left; background:url("/mimodb/image/tableft.gif") no-repeat left top; margin:0; padding:0 0 0 5px; text-decoration:none; } #menus a span { float:left; display:block; background:url("/mimodb/image/tabright.gif") no-repeat right top; padding:5px 15px 4px 6px; color:#FFF; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ #menus a span {float:none;} /* End IE5-Mac hack */ #menus a:hover span { color:#FFF; } #menus a:hover,#menus a.current { background-position:0% -42px; } #menus a:hover span,#menus a span.current { background-position:100% -42px; }但是显示的结果是这样,
请问该如何解决? 展开
2个回答
展开全部
#menus ul li div ul{float:left; margin:0px; padding:0px;}
把这个样式加里就好了
把这个样式加里就好了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询