moon_dance
11-11-2006, 02:29 PM
I'm trying to use a CSS layout from the Layout Resevoir (http://www.bluerobot.com/web/layouts/) at bluerobot.com (http://www.blurobot.com) but there is one inconsistency between mine and the layout there: my header won't go all the way across the page like it is in both the 2 column layouts and the layout of bluerobot.com (http://www.blurobot.com) itself. I've tried to put in width:100%; but that didn't work. Any Ideas on how to achieve this? :help:
I just realized it might be easier to help if you had my code, so here it is:
<html>
<head>
<title>Two Column CSS Layout with Header</title>
<style type="text/css">
body
{ margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
#header {
margin:50px 0px 10px 0px;
padding:17px 0px 0px 20px;
width: 100%;
/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
height:33px; /* 14px + 17px + 2px = 33px */
border-style:solid;
border-color:black;
border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
line-height:11px;
background-color:#eee;
}
#left {
position: absolute;
left: 15px;
top: 160px;
width: 200px;
border: solid #000000 1px;
}
#center {
top: 0;
margin-left: 230px;
margin-right: 15px;
border: solid #000000 1px;
}
</style>
</head>
<body>
<div id="header" style="width: 604px; height: 100px">
Header :)</div>
<div id="left" style="position: absolute; left: 16px; top: 159px; height: 160px">
<b>Menu</b>
<p>Link</p>
<p>Link</p>
<p>Link</p>
<p>Link</p>
</div>
<div id="center">
<b>Content</b>
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</div>
</body>
</html>
I just realized it might be easier to help if you had my code, so here it is:
<html>
<head>
<title>Two Column CSS Layout with Header</title>
<style type="text/css">
body
{ margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
#header {
margin:50px 0px 10px 0px;
padding:17px 0px 0px 20px;
width: 100%;
/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
height:33px; /* 14px + 17px + 2px = 33px */
border-style:solid;
border-color:black;
border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
line-height:11px;
background-color:#eee;
}
#left {
position: absolute;
left: 15px;
top: 160px;
width: 200px;
border: solid #000000 1px;
}
#center {
top: 0;
margin-left: 230px;
margin-right: 15px;
border: solid #000000 1px;
}
</style>
</head>
<body>
<div id="header" style="width: 604px; height: 100px">
Header :)</div>
<div id="left" style="position: absolute; left: 16px; top: 159px; height: 160px">
<b>Menu</b>
<p>Link</p>
<p>Link</p>
<p>Link</p>
<p>Link</p>
</div>
<div id="center">
<b>Content</b>
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</div>
</body>
</html>