<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;
        }

解决方案 »

  1.   

    好像你的样式都没有定义高度,IE8和FF好像都要设置高度
      

  2.   

    有空白么。
    http://www.cnblogs.com/Gavinzhao/archive/2011/05/09/2040432.html
      

  3.   

    再隐藏的时候顺便设定这个div的高度为0呢还有看看html代码的空白问题,比如div之前有个空白或者换行之类的有时候隐藏了div但是还是会显示一块空白
      

  4.   

      问题解决了  是div的样式出错了 
      去掉float属性就好了  不知道float:left +  display:none  是不是等于 visibility:hidden?
      

  5.   

    在ie6下就没这个问题,ie8下虽然display是none了但是有float那个div就还在占着位置,我也遇到过这个问题