aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes position a div under a label in any part of the page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "position a div under a label in any part of the page" Watch "position a div under a label in any part of the page" New topic
Author

position a div under a label in any part of the page

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi guys! Suppose 3 labels, the table is positioned in some random part of the page and these labels are inside a table





and then I have a div



Now, I need to create a javascript code that positions the submenu under, let's say label b. How can I do exactly that? There's not problem with hiding/hiding the div, I just need it to appear right under label b. I can do this with absolute positioning but then when the browser is resized, the div is placed somewhere else! Thanks!


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Going to have to use JavaScript



basic use



Eric
Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
You are the man! Cheers! Thanks a lot!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: position a div under a label in any part of the page