Log in

View Full Version : urgent help



Oni
02-07-2007, 03:42 PM
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?

Dentafrice,
02-07-2007, 05:35 PM
Use absolute positioning

Oni
02-07-2007, 05:48 PM
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.

Dentafrice,
02-07-2007, 05:53 PM
well if you dont want it to move on different sizes you want to use that.

[Oli]
02-07-2007, 07:24 PM
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.

Dentafrice,
02-07-2007, 07:31 PM
Me either, I just thought it was absolute.

kyle♥
03-07-2007, 08:38 AM
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.

Mentor
03-07-2007, 09:02 AM
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.

Splinter
03-07-2007, 09:26 AM
Well I would suggest using relative positioning or simply use percentages of the screen instead of absolute numerical values.

Oni
03-07-2007, 06:56 PM
Currently it is

#Layer1 {
position:absolute;
width:421px;
height:548px;
z-index:1;
left: 177px;
top: 226px;
visibility: hidden;
}

What should it be?

Oni
05-07-2007, 04:00 PM
Could someone please help?

Tomm
05-07-2007, 04:04 PM
You can't just say what would that be based on a little bit of CSS.. we don't even have a clue what it looks like.

Want to hide these adverts? Register an account for free!