Jquery 请更正此浏览器兼容性问题
我的CSS代码: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
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添加到页面,使其不会以怪癖模式呈现
- 不要设置主体元素的宽度
- 以下是一些思考: