gwmbox
06-15-2008, 05:52 AM
Hi guys
This one has got me - the answer is probably staring right at me...
I have attached an image representing the basics;
It basically has a top, middle and bottom with also an image that we have in the far right bottom. The content area however overlaps the top and bottom parts. But I need the content area to be centered on the page and it's height to be the height of the browser or the page height (if taller than the browser height) and remain only 45 px's overlapped both top and bottom. It should fully expand the height to the full height.
I hope I make sense what I have been playing with so far is
/*-----------------------------------------------------------------------------
Page Layout and Background Styles
-----------------------------------------------------------------------------*/
#page-wrapper {
width: 100%;
border: 1px solid red;
margin: 0 auto;
text-align: center;
}
#page-top {
position: absolute;
top: 0;
left: 0;
width: 100%;
background-image: url(../images/pg-top.jpg);
height: 150px;
padding: 0;
margin: 0;
z-index: 1;
border: 1px solid red;
}
#page-mid {
position: relative;
width: 900px;
top: 105px;
bottom: 105px;
padding: 0;
margin: 0;
background-color: white;
text-align: left;
z-index: 2;
border: 1px solid red;
}
#page-bottom {
position:absolute;
width:100%;
height: 150px;
padding: 0;
margin: 0;
left: 0px;
bottom: 0px;
background: url(../images/pg-bottom.jpg) repeat-x left;
z-index: 0;
border: 1px solid red;
}
#page-shell {
position: absolute;
width: 503px;
height: 412px;
padding: 0;
margin: 0;
bottom: 0px;
right: 0px;
background: url(../images/largeshell.jpg) no-repeat bottom right;
z-index: 0;
border: 1px solid red;
}
The borders are they just to see if it is being layed out correctly
the HTML
<div id="page-wrapper">
<div id="page-top"><img src="includes/images/null.gif" width="1" height="1" alt="the header"></div>
<div id="page-mid">The content area</div>
<div id="page-bottom"><img src="includes/images/null.gif" width="1" height="1" alt="the footer"></div>
<div id="page-shell"><img src="includes/images/null.gif" width="1" height="1" alt="an image for bottom right"></div>
</div>
Hope I make sense and you can help
Cheers
This one has got me - the answer is probably staring right at me...
I have attached an image representing the basics;
It basically has a top, middle and bottom with also an image that we have in the far right bottom. The content area however overlaps the top and bottom parts. But I need the content area to be centered on the page and it's height to be the height of the browser or the page height (if taller than the browser height) and remain only 45 px's overlapped both top and bottom. It should fully expand the height to the full height.
I hope I make sense what I have been playing with so far is
/*-----------------------------------------------------------------------------
Page Layout and Background Styles
-----------------------------------------------------------------------------*/
#page-wrapper {
width: 100%;
border: 1px solid red;
margin: 0 auto;
text-align: center;
}
#page-top {
position: absolute;
top: 0;
left: 0;
width: 100%;
background-image: url(../images/pg-top.jpg);
height: 150px;
padding: 0;
margin: 0;
z-index: 1;
border: 1px solid red;
}
#page-mid {
position: relative;
width: 900px;
top: 105px;
bottom: 105px;
padding: 0;
margin: 0;
background-color: white;
text-align: left;
z-index: 2;
border: 1px solid red;
}
#page-bottom {
position:absolute;
width:100%;
height: 150px;
padding: 0;
margin: 0;
left: 0px;
bottom: 0px;
background: url(../images/pg-bottom.jpg) repeat-x left;
z-index: 0;
border: 1px solid red;
}
#page-shell {
position: absolute;
width: 503px;
height: 412px;
padding: 0;
margin: 0;
bottom: 0px;
right: 0px;
background: url(../images/largeshell.jpg) no-repeat bottom right;
z-index: 0;
border: 1px solid red;
}
The borders are they just to see if it is being layed out correctly
the HTML
<div id="page-wrapper">
<div id="page-top"><img src="includes/images/null.gif" width="1" height="1" alt="the header"></div>
<div id="page-mid">The content area</div>
<div id="page-bottom"><img src="includes/images/null.gif" width="1" height="1" alt="the footer"></div>
<div id="page-shell"><img src="includes/images/null.gif" width="1" height="1" alt="an image for bottom right"></div>
</div>
Hope I make sense and you can help
Cheers