<div class="l_menu">
<h3 id="menu15" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="HyperLink3" runat="server" Target="Matter">排污申报</asp:HyperLink></h3>
</div>
<div class="l_menu" id="pc">
<h3 id="menu13" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="HyperLink30" runat="server" Target="Matter">污染源普查</asp:HyperLink></h3>
</div>
<div class="l_menu" id="hjtj" >
<h3 id="menu14" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="HyperLink31" runat="server" Target="Matter">环境统计 </asp:HyperLink></h3>
</div>
<div class="l_menu" id="sjhz" >
<h3 id="H4" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="linkSJHZ" runat="server" Target="Matter">数据汇总</asp:HyperLink></h3>
</div>
如上结构 body
{
margin: 0 auto;
background: url(../images/leftbg.gif) repeat-y top left;
}
#left
{
width: 180px;
height: 100%;
}
#slider
{
position: absolute;
top: 150px;
left: 168px;
}
.l_menu, l_menu_wry
{
width: 178px;
float: left;
margin-bottom: -1px;
}
.l_menu h3, .l_menu h3.a1
{
font-size: 12px;
margin: 0 auto;
padding: 0;
font-weight: normal;
text-indent: 30px;
line-height: 30px;
height: 30px;
overflow: hidden;
background: url(../images/l_tit_bg.gif) repeat-x top left;
}
.l_menu h3:hover, .l_menu h3.a2
{
background: url(../images/l_tit_bg_on.gif) no-repeat top left;
}
.l_menu h3 a
{
text-decoration: none;
color: #000000;
}
.l_menu h3 a:hover
{
color: #990000;
}
.l_menu ul, .l_menu_wry ul
{
margin-left: 3px;
margin-top: 0px;
margin-bottom: 0px;
text-align: left;
list-style: none;
padding: 0;
}
.l_menu ul li, .l_menu_wry ul li
{
width: 100%;
float: left;
left: 0px;
margin: 0;
padding: 0;
line-height: 24px;
font-size: 12px;
list-style: none;
}
.l_menu ul li a, .l_menu_wry ul li a
{
padding-left: 30px;
width: 178px;
display: block;
float: left;
color: #333333;
text-decoration: none;
background: url(../images/i2.gif) repeat-x top left;
}
.l_menu ul li a:hover, .l_menu_wry ul li a:hover
{
background: #f6f9fd url(../images/i1.gif) no-repeat top left;
color: #000000;
}
.l_menu_wry h3, .l_menu_wry h3.a1
{
font-size: 12px;
margin: 0 auto;
padding: 0;
font-weight: normal;
text-indent: 30px;
line-height: 30px;
height: 30px;
overflow: hidden;
background: url(../images/l_tit_bg.gif) no-repeat top left;
}
.l_menu_wry h3:hover, .l_menu_wry h3.a2
{
background: url(../images/l_tit_bg_on.gif) no-repeat top left;
}
.l_menu_wry h3 a
{
text-decoration: none;
color: #000000;
}
.l_menu_wry h3 a:hover
{
color: #990000;
}
<h3 id="menu15" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="HyperLink3" runat="server" Target="Matter">排污申报</asp:HyperLink></h3>
</div>
<div class="l_menu" id="pc">
<h3 id="menu13" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="HyperLink30" runat="server" Target="Matter">污染源普查</asp:HyperLink></h3>
</div>
<div class="l_menu" id="hjtj" >
<h3 id="menu14" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="HyperLink31" runat="server" Target="Matter">环境统计 </asp:HyperLink></h3>
</div>
<div class="l_menu" id="sjhz" >
<h3 id="H4" onclick="menusOnclick(this.id,'');" style="cursor: pointer;">
<asp:HyperLink ID="linkSJHZ" runat="server" Target="Matter">数据汇总</asp:HyperLink></h3>
</div>
如上结构 body
{
margin: 0 auto;
background: url(../images/leftbg.gif) repeat-y top left;
}
#left
{
width: 180px;
height: 100%;
}
#slider
{
position: absolute;
top: 150px;
left: 168px;
}
.l_menu, l_menu_wry
{
width: 178px;
float: left;
margin-bottom: -1px;
}
.l_menu h3, .l_menu h3.a1
{
font-size: 12px;
margin: 0 auto;
padding: 0;
font-weight: normal;
text-indent: 30px;
line-height: 30px;
height: 30px;
overflow: hidden;
background: url(../images/l_tit_bg.gif) repeat-x top left;
}
.l_menu h3:hover, .l_menu h3.a2
{
background: url(../images/l_tit_bg_on.gif) no-repeat top left;
}
.l_menu h3 a
{
text-decoration: none;
color: #000000;
}
.l_menu h3 a:hover
{
color: #990000;
}
.l_menu ul, .l_menu_wry ul
{
margin-left: 3px;
margin-top: 0px;
margin-bottom: 0px;
text-align: left;
list-style: none;
padding: 0;
}
.l_menu ul li, .l_menu_wry ul li
{
width: 100%;
float: left;
left: 0px;
margin: 0;
padding: 0;
line-height: 24px;
font-size: 12px;
list-style: none;
}
.l_menu ul li a, .l_menu_wry ul li a
{
padding-left: 30px;
width: 178px;
display: block;
float: left;
color: #333333;
text-decoration: none;
background: url(../images/i2.gif) repeat-x top left;
}
.l_menu ul li a:hover, .l_menu_wry ul li a:hover
{
background: #f6f9fd url(../images/i1.gif) no-repeat top left;
color: #000000;
}
.l_menu_wry h3, .l_menu_wry h3.a1
{
font-size: 12px;
margin: 0 auto;
padding: 0;
font-weight: normal;
text-indent: 30px;
line-height: 30px;
height: 30px;
overflow: hidden;
background: url(../images/l_tit_bg.gif) no-repeat top left;
}
.l_menu_wry h3:hover, .l_menu_wry h3.a2
{
background: url(../images/l_tit_bg_on.gif) no-repeat top left;
}
.l_menu_wry h3 a
{
text-decoration: none;
color: #000000;
}
.l_menu_wry h3 a:hover
{
color: #990000;
}
http://www.cnblogs.com/Gavinzhao/archive/2011/05/09/2040432.html
去掉float属性就好了 不知道float:left + display:none 是不是等于 visibility:hidden?