Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Absolute/Relative Positioning

Status
Not open for further replies.

fenneraj

Programmer
Jul 29, 2003
21
SE
Hi All!

I have had this prob for a while and probably comes my poor design, but I am now in a fix and need some help.

I have a site that has main content on the left and navigation and progress reporting on the right. Up until now the navigation button (<CANCEL>, <BACK>, <NEXT> <-- All nested in a table) have been aligned nicely under the progress display on the right, yet the code was located within the main window so that it could trigger a form. I use absolute positioning from the top left corner to place the small table in the position i want. Unfortunately I have just upgraded to a nice new 17" screen and upped the resolution, and yep, you guessed it, my little button table now sits right in the middle of the screen...

I have been looking at using CSS positioning to make this element relative to another element in my page like an anchor, yet i cannot find a way of doing this... does anyone have any bright ideas of how I can solve this?
 
I know it is a late reply but since the issue remains unsolved, here's a suggestion. Absolute positioning will take the elements out of document flow and position them in the provided coordinates from the top left edge of the first positioned parent of the element. If no such parent exists, viewport (browser window) will be used. As long as you put position declaration on your parent element that holds absolutely positioned items, you should have no problems.
 
If it is absolutely positioned from the top-left, I'm not sure (unless you're using percentages), how it could move when increasing your screen resolution (the monitor's size has nothing to do with it).

Try using ems and seeing if you still have the same issue. Make sure you're setting left not right, too.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top