PDA

View Full Version : Absolute Positioning???


Tomcat104
04-16-2012, 07:25 PM
I'm trying to use Absolute Positioning for the first time, actually I've been trying it for quite a while. Now I've decided to give up and ask for help. I may have approached the problem the wrong way; my goal was to have a menu that appeared on top of another image. It looks the way I want it to on my 1600x900 laptop but NOTHING else.

Would someone take a look at it and tell me what I did wrong or a different method I could have used please?

http://rcwarplanes.com/Hwy49Cafe/index.html


David

edbr
04-17-2012, 01:27 AM
the best way to use it in this case is inside a relatively positioned parent

you position your menu
top: 25px;
left: 640px;
and it takes its reference for the screen top and left side,
if it was in a relatively positioned element like a header for example you can position form the edges of that.

Corrosive
04-17-2012, 07:39 AM
Absolute positioning takes it's position on the page based on a reference from the screen unless you wrap it in a relatively positioned div. Of course, as you look at your website on different screens/sizes/resolutions, the reference changes and so your website gets all out of whack.

Tomcat104
04-17-2012, 04:24 PM
the best way to use it in this case is inside a relatively positioned parent

you position your menu
top: 25px;
left: 640px;
and it takes its reference for the screen top and left side,
if it was in a relatively positioned element like a header for example you can position form the edges of that.


I tried to follow this but nothing seems to have happened even though I changed quite a few things. Could you take a look at it again and tell me where I went wrong?

Much thanks!

http://rcwarplanes.com/Hwy49Cafe/index.html (http://rcwarplanes.com/Hwy49Cafe/index.html)