Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 请更正此浏览器兼容性问题_Jquery_Css_Cross Browser - Fatal编程技术网

Jquery 请更正此浏览器兼容性问题

Jquery 请更正此浏览器兼容性问题,jquery,css,cross-browser,Jquery,Css,Cross Browser,我的CSS代码: body { padding:0; margin:10px auto; width:800px; } .wrapper { width:800px; background-color:#0099FF; } .bannercont { margin-top:5px; height:90px; width:800px; } .banner { position:relative; top:20px; background-image:url(../images

我的CSS代码:

body
{
padding:0;
margin:10px auto;
width:800px;
}

.wrapper
{
 width:800px;
 background-color:#0099FF;
}

.bannercont
{
 margin-top:5px;
 height:90px;
 width:800px;
}

.banner
{
 position:relative;
 top:20px;
 background-image:url(../images/livesupport.png);
 width:267px;
 height:32px;
}
我的HTML:

<html>
    <head>

    <link href="../css/iestyle.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="../js/jquery.js"></script>
    <script language="javascript" src="../js/jquery.corners.js"></script>


    <script>

        $(document).ready( function(){
        //$('.banner').corners("30px transparent top");  
        });

    </script>


    </head>

    <body>

    <div class="wrapper">
        <div class="bannercont"><div class="banner"></div></div>


    </div>

   </body>
</html>

$(文档).ready(函数(){
//$('.banner')。角落(“30px透明顶部”);
});

横幅在firefox中居中显示,在Internet Explorer中左对齐。我需要它居中。请帮助我

您应该使用横幅:

margin: 0 auto;

它将自动在浏览器范围内居中显示。

您应该使用横幅:

margin: 0 auto;
它将自动在浏览器范围内居中。

添加

display: block;
margin: 0 auto;
添加到横幅元素

display: block;
margin: 0 auto;

对于banner元素,以下是一些反映:

  • 将doctype添加到页面,使其不会以怪癖模式呈现
  • 不要设置主体元素的宽度

    • 以下是一些思考:

      • 将doctype添加到页面,使其不会以怪癖模式呈现
      • 不要设置主体元素的宽度