Forum Moderators: not2easy
I tryied to do this using a table with % width. I works fine, but I have a problem with layers. If I set the layers position to "absolute" they doesn't move with the rest of the page's text. If I set the layers position to "relative" they move with the rest of the page's text, but a big empty space shows up where the layer's code is.
Also, is there a way to achieve this page's resolution adaptation in all site at once? maybe through css?.
Thanks a lot.
If I use a table with % width I still have the problem with the layers, wich doesn't look centered. All the content shows centered, but the layers (that I use for some menus) doesn't. You can imagine how bad the pages looks with this option.
I guess the layers doesn't center because they're set to "absolute", so I try to set them to "relative". The problem with this is that a blank space shows up in page, a blank space in the exact position where the layer's code is.
I don't know what to do. Any ideas?. Anybody have worked with "relative" position in layers previously?.
Thanks a lot
The main thing is that it shows properly on your site. You can even just do tweaks by opening the pages in notepad....
[OH! Welcome to Webmaster World!]
I would test the page in some browsers to make sure you are getting what you're looking for and then you could just work with the uncentered design in DW view knowing it'll be alright on the net.
the easiest way to center would be to place one wrapper div (layer) around the whole design, give it the width, then set it's margin: 0 auto; and then if you make it position: relative you can then position other div's inside this using absolute or relative positioning.
(IE quirks won't center using this method but see below for it's solution too )
eg:
<body>
<div id="wrapper"> everything else inside here </div>
</body>
CSS:
body {text-align: center;} /* for IE5.x */
#wrapper {
text-align: left; /* reset above */
position: relative;
margin: 0 auto;
width: 760px; /* or whatever */
}
Suzy