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

Target Layers

Status
Not open for further replies.

DarrenPower

IS-IT--Management
Nov 1, 2001
56
GB
I wonder if anyone can help me?

At the following: I have some code which creates a drop down menu and places it absolutely on the page. What I need is to have this relative to the table cell that it sits over. Basically the same look and feel but I need to be able to center the entire content based on the user's resolution and can't due to the absolute positioning.

Any help would be appreciated.

Cheers,

Darren.
 
You could use frames instead. That way the code that you have would still work and you wouldn't have to worry about redrawing the page (or at least the menus) every time the page reloads.

Hope this helps

Phil
 
Hi Phil,

I'd thought of that, but the client expressly asked me not to use frames for the site due to problems with their clients previously.

Please clarify if I've missed the point entirely, my JavaScript's waned quite severely through lack of use!

Darren.
 
No, that was exactly what I meant!!!

If that's what the client wants, then fair enough, but frame support to the level that you appear to need it is very basic and is the same, all the way back to version 3 browsers.

Another solution you could use (although this is in theory, I haven't tested it.) is to use relative positioning, and under the links which you mouseover to display the menu, put a table row 1 pixel high. Use the cell widths to line the menus up in the right place. I think this would work.

 
Hi Phil,

Unfortunately the entire menu is positioned absolutely (this'll teach me for cut-and-paste code!!) so I can't/forgotten how to reference the root menu to the target cell.

I appreciate your help though, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top