我已经使用css为某些div设置了背景,并将它们设置为相同的%,但它们的大小不同。我试图让标题和bodyoverlay div大小相同。我在做什么冤枉? 这是css:
@charset "utf-8";
body {
margin-left: 0px;
margin-right:0px;
margin-top: 0px;
padding:0px;
}
#wrapper{
margin-left:17.3875%;
}
/*HEADER*/
/*===================================================================*/
#header{
z-index:-98;
width:65.225%;
height:100px;
background:url(WireFrame/Nav%20Bar.png)
}
#navigation{
}
/*BODY*/
/*===================================================================*/
#bodyoverlay{
background:url(WireFrame/Body.png);
position:fixed;
z-index:-99;
height:100%;
width:65.225%;
background-repeat:repeat-y
}
#body{
z-index:-98;
height:100%;
width: 100%;
}
这是html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index</title>
<link href="CSS.css" rel="stylesheet" type="text/css" />
</head>
<body>
<img src="file:///U|/Year 8/ICT/Webdesign/WireFrame/Background.jpg" name="BG" width="4000" height="2670" id="BG" />
<div id = "wrapper">
<div id = "header">
<div id = "navigation">
</div>
</div>
<div id = "body">
<div id = "bodyoverlay">
</div>
<div id = "slideshow">
</div>
<div id = "Content">
</div>
</div>
<div id = "footer">
</div>
</div>
</body>
</html>