File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Div layout problems