*
The moose likes HTML, CSS and JavaScript and the fly likes Div layout problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Div layout problems" Watch "Div layout problems" New topic
Author

Div layout problems

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
OK, I have three sections (divs) to my page, title,navigationbar,body, and they are centered on the page, and relative.

I have a nested div inside the navigationbar section, and I want it to "dropdown" when I click on it, but when I do the following:



Not only does my button get longer, but so does the outer div, and the button get WAY bigger, not just 200 bigger?!

what am I doing wrong, and how do I make the button extend, but on top of all the other divs, do I need to mess with it's z-index?

Thanks,

Justin Fox
[ April 15, 2008: Message edited by: Bear Bibeault ]

You down with OOP? Yeah you know me!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you alert currheightnum, what is the value you are seeing?

Eric
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
I fixed it, sorry,

and yes i was accidently "+=" two strings, it was 25200 lol

but I rearranged the layout a bit, I moved the navigation bar
inside the body and made the "homemade" dropdown absolute inside the
body, but ontop of the navigation, this worked perfect.

You can look at the layout at www.buddyboysbullyfarm.com/hello.html

Justin Fox
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Div layout problems
 
Similar Threads
Printing with DIV tags
Drop down box problem in AJAX
disable submit button help
rich:hotKey worked when using jQuery?
insertBefore node was not found