justbreathe
04-08-2011, 07:35 AM
I am trying to avoid using absolute positioning so the layout stays centered in all browsers. I chose random background colors for the divs so you could see the problem. I am trying to get the blue box to align at the very top of the layout. The pink box needs to be under the banner (the banner is the grey box).
http://obsidianskies.webs.com/ffffffffff.htm
how do I align the blue box at the top?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Site Tittle</title>
<style type="text/css">
body
{
background-image:url("http://i53.tinypic.com/4u6mvb.jpg");
background-repeat:repeat-y;
background-position:50% 50%;
margin:0px;
padding:0px;
background-color:#555555;
font-family:Verdana, Geneva, sans-serif;
font-size:11px;
color:#000000;
}
#banner
{
display:block;
margin:0 auto;
}
#align-1
{
margin-left:-213px;
}
#align-2
{
margin-left:-213px;
}
#main-wrapper
{
display:block;
margin:0 auto;
width:627px;
overflow:auto;
height:100px;
background-color:pink;
}
#fix
{
display:table;
margin:0 auto;
width:841px;
background-color:green;
height:100px;
}
#align-3
{
margin-left:1px;
}
#nav-wrapper
{
float:right;
width:213px;
overflow:auto;
height:100px;
background-color:blue;
}
</style>
</head>
<body>
<div id="align-1"><img src="http://i53.tinypic.com/23swtxv.jpg" id="banner" alt="banner"></div>
<div id="align-2"><div id="main-wrapper"></div></div>
<div id="align-3"><div id="fix"><div id="nav-wrapper"></div></div></div>
</body>
</html>
http://obsidianskies.webs.com/ffffffffff.htm
how do I align the blue box at the top?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Site Tittle</title>
<style type="text/css">
body
{
background-image:url("http://i53.tinypic.com/4u6mvb.jpg");
background-repeat:repeat-y;
background-position:50% 50%;
margin:0px;
padding:0px;
background-color:#555555;
font-family:Verdana, Geneva, sans-serif;
font-size:11px;
color:#000000;
}
#banner
{
display:block;
margin:0 auto;
}
#align-1
{
margin-left:-213px;
}
#align-2
{
margin-left:-213px;
}
#main-wrapper
{
display:block;
margin:0 auto;
width:627px;
overflow:auto;
height:100px;
background-color:pink;
}
#fix
{
display:table;
margin:0 auto;
width:841px;
background-color:green;
height:100px;
}
#align-3
{
margin-left:1px;
}
#nav-wrapper
{
float:right;
width:213px;
overflow:auto;
height:100px;
background-color:blue;
}
</style>
</head>
<body>
<div id="align-1"><img src="http://i53.tinypic.com/23swtxv.jpg" id="banner" alt="banner"></div>
<div id="align-2"><div id="main-wrapper"></div></div>
<div id="align-3"><div id="fix"><div id="nav-wrapper"></div></div></div>
</body>
</html>