Forum Moderators: not2easy

Message Too Old, No Replies

div centering and positioning another div above it

         

graphix

12:56 am on Jun 6, 2004 (gmt 0)

10+ Year Member



Hi all, Im having a little problem trying to get some DIVs aligned properly

I have a page, with all the content in one layer, and that layer is centered using text-align:center, with position:relative.
That layer behaves fine

I have a navigation menu which must be in a seperate layer.

Since the page is centered, if I give an absolute position to my navigation layer it will not line up correctly on different browser window sizes and resolutions

Is there anyway to make the navigation layer behave the same as the centered content layer?

I've tried making both layers the same size, but the navigation one wont center unless it is set to a relative position, and then it wont "stack" on top of the other layer if so.
I tried setting left paddding to 50% and giving the layer a negative value to center it, but again it has to be set to relative for it to work.

Should I be centering a different way to get around this maybe?

Any ideas are appreciated.

claus

1:11 am on Jun 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Uhm...

---------------------------- 
<div class="pageholder">

<div class="navigation"> ... </div>

<div class="content"> ... </div>

</div>
----------------------------

...see?

graphix

1:43 am on Jun 6, 2004 (gmt 0)

10+ Year Member



yeah i overlooked wrapping it in another DIV
working too long on it
thanks for the help