Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page centering w/ numerous layers!!

Status
Not open for further replies.

whoknows361

Technical User
Sep 22, 2005
228
US
Hello, I need help understanding how to center an entire webpage - so that the page is centered despite the resolution of the user. I understand how to do it by adding a table using:

<body>
<table width="100%" height="678" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
"layer here"
</tr>
</table>
</body>

but it only seems to work that whatever layer I put in the "layer here" section above is centered - but I can't have a whole page centered! Some pages I have have over 30 layers in them - and I want them all spaced evenly despite the resolution in the center of the screen. wait maybe I answered my own question - can I have a central all encompassing layer that is centered & have all my other layers within that layer - will that keep my spacing correct & my page centered?
 
I have used a wrapper.

<head>
<style>
body {
margin: 0;
padding: 0;
text-align: center;
}
#wrapper {
position: relative;
top: -1px;
right: 0;
margin: 0 10px;
width: 200px;
text-align: left;
left: 0px;
}
</style>

<body>
<div id="wrapper">

put your code here. Make layers absolute.

</div>

Hope this helps.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top