css的margin-top问题!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
#top{
background-image:url(images/8_1.jpg);
width:926px;
height:124px;
margin:0 auto;
}
#top h1{
color:#9999cc;
margin-top:47px;
margin-left:57px;
}
</style>
</head>
<body>
<div id="top">
<h1>ENJOY CSS</h1>
</div>
</body>
</html>
按理来说,效果应该是这样的:
在IE9和Chrome中实际上的效果是这样的:
请问这是什么问题?
[解决办法]
#top{
background-color:#cccccc;
width:926px;
height:124px;
margin:0 auto;
}
#top h1{
color:#9999cc;
padding-top:47px;
padding-left:57px;
}