-
urgent help
Ok im coding a layout by putting tables inside layers on dreamweaver but the layers move on different size screens. I think its because the layout is centered but the layers are defined as x/y positions so always stay in the same place on different size screens but the layout moves as its centred. How do I fix this?
-
-
Quote:
Originally Posted by
Dentafrice,
Use absolute positioning
Wait isnt that what I dont want to do because it tells it exactly where to be positioned which will change in relation to the centred layout.
-
well if you dont want it to move on different sizes you want to use that.
-
i hate them layers.
but just do:
<div align="center">
<div id="main">
<div id="layer1">content</div>
</div>
</div>
And put your layers as position: relative;
and i'm not sure if you have to put div "main" on position: relative; too...
just test it out.
Anoying things them layers... i never use em.
-
Me either, I just thought it was absolute.
-
Try a div if it's not positioning right? then just asign it with y-axis: amounth of pixles x-axis: amount of pixels.
I think that's the right code. And done Web Designing in a while :P.
-
Dont absoulty position divs, its bad, have a centered container div, (margin:auto; - also make sure you set a width)
Then within that div, place all your other divs, floating is useful for haveing side bars etc, just aim to keep everythingfluid so its position is determined by whats around it, rather than specifed directly.
if you do that it'll all be fine.
Alternativly alothough its kinda bad practis, use negative margins and absoulte positioning so as to keep relative centering.. aka set elements left margin to 50%, then set the pages left margin negativly half the elements width your adding in, so it in practis is always placed in the same place, increase or decrese this depending on where on the page you want it. This method will make sure its all centerd so will work on any screen res.. Although my first solution although often harder is a better idea in terms of w3 standards and compatiblty.
-
Well I would suggest using relative positioning or simply use percentages of the screen instead of absolute numerical values.
-
Currently it is
#Layer1 {
position:absolute;
width:421px;
height:548px;
z-index:1;
left: 177px;
top: 226px;
visibility: hidden;
}
What should it be?