whoknows361
Technical User
Hello pro's.. I am a relative newbie - and I have a question regarding centering my web page so that varying resolutions will still bring the page centered (horizontally of course). At this point, I can center a box at various resolutions using a wrapper - but I can't figure out how to add layers (i use dreamweaver) into this box so that they will move when this outside wrapper moves - keeping everything lined up.. .Here is what I have so far:
<style>
#mainbox{
width: 1003;
height: 1000;
border: 1px solid black;
margin-right: auto;
margin-left: auto;
}
</style>
& in my body tags:
<div id="mainbox"></div>
Now this creates a box this is always centered in various resolutions. I want to add more layers within this mainbox - so that if mainbox adjusts right with a particular resolution - all my other layers within mainbox does the same. I have tried entering other layers in between mainbox's div tags such as:
<div id="mainbox">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 41px; top: 28px;">left</div>
</div>
but only the mainbox correctly moves to center & the other layers just stay where they were... can someone please help me with this... all help is appreciated as I have been trying to solve this one for awhile on my own. Thanks again
Jonathan
<style>
#mainbox{
width: 1003;
height: 1000;
border: 1px solid black;
margin-right: auto;
margin-left: auto;
}
</style>
& in my body tags:
<div id="mainbox"></div>
Now this creates a box this is always centered in various resolutions. I want to add more layers within this mainbox - so that if mainbox adjusts right with a particular resolution - all my other layers within mainbox does the same. I have tried entering other layers in between mainbox's div tags such as:
<div id="mainbox">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 41px; top: 28px;">left</div>
</div>
but only the mainbox correctly moves to center & the other layers just stay where they were... can someone please help me with this... all help is appreciated as I have been trying to solve this one for awhile on my own. Thanks again
Jonathan