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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

div position relative to a table

Status
Not open for further replies.

tinapa

Technical User
Nov 12, 2008
81
GB
hi folks! how can you position a div tag relative to a table? i am asking this because when i look at my webpage in 1024res it looks ok. but when i look this same page in 1280+ resolution it doesnt look good. the div tag stays on the same spot where you can find it on 1024res. i've tried styling div tag with left:xx% but to no avail.

any ideas guys?
 
I assume your table is centred (meaning that really it moves around with changing resolutions) and your div is positioned absolutely or relatively with hard top/left coordinates.

It will never work this way. You can move the div relative to the table by:

1. Putting one inside the other. This is definitely a preferred option.
2. Putting them both inside a container that has a common behaviour.
3. Using the same positioning scheme on both elements.

Since we cannot see your code, we cannot fully advise you how to change your code.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top