当前位置: 代码迷 >> 跨浏览器开发 >> 请各位帮帮忙解决IE7和IE8的兼容性有关问题
  详细解决方案

请各位帮帮忙解决IE7和IE8的兼容性有关问题

热度:7195   发布时间:2013-02-26 00:00:00.0
请各位帮帮忙解决IE7和IE8的兼容性问题
就是有点细微的下边有一条线,在IE7里面就显示有一条线,在IE8里就不会显示那条线,希望各位大侠帮帮忙,怎么解决这个兼容性问题:



CSS code
.menu{    width:1003px;    height:44px;    margin:auto;    z-index:-1;    line-height:44px;}.menu ul{    margin-left:0px;    margin-right:0px;    line-height:46px;    list-style-type:none;    padding:0;    margin-top:-1px;    margin-bottom:-1px;    height:46px;    z-index:1;}.menu li{    width:249px;    height:46px;    float:left;    line-height:46px;    font-size:14px;    margin-top:-1px;    margin-bottom:-1px;    text-align:center;    border-left:1px #ccc solid;}.menu a.current{        background:url(../images/menu_smyj_bg_27.gif) no-repeat;    color:#fff;        height:46px;        margin-top:-1px;    margin-bottom:-1px;    font-weight:700;}

HTML code
    <div class="menu">      <ul>        <li><a href="#"  class="current">1</a></li>        <li><a href="index2.htm">2</a></li>        <li><a href="index3.htm">3</a></li>        <li> <a href="index4.htm">4</a></li>      </ul>    </div>


------解决方案--------------------------------------------------------
<meta http-equiv="X-UA-Compatible" content="IE=7" />在head里面加上 让IE8以IE7的方式渲染
  相关解决方案