Posts: 7
Name: Nora
Location: The Netherlands
|
Not sure what you mean by aligning vertically.. do you mean you want all div elements to show up under each other?
I'm not sure what your goal is with z-index. Your CSS is a lot more complicated than it has to be. Try this:
Quote:
<!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>Untitled Document</title>
<style type="text/css">
<!--
#master {
height: auto;
width: 850px;
margin: 0 auto;
}
#header {
height:200px;
color: #996;
background-color: #00CC33;
}
body {
background-color: #00F;
background-image: url(ALL%20WEBSITE%20STUFF/Photoshop/finished%20artwork/cellbg.gif);
}
#content {
height:400px;
background-color: #FF3333;
}
#footer {
height:100px;
background-color: #00CCCC;
}
-->
</style>
</head>
<body valign="middle">
<div id="master">
<div id="header"></div>
<div id="content"></div>
<div id="footer"></div>
</div>
</body>
</html>
|
You don't need to use positioning for a basic layout.. divs will automatically align themselves vertically. If not, just use the clear: both; property.
Hope this helps 
|