wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes HTML/CSS: Div doesn't expand to hold floated elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML/CSS: Div doesn Watch "HTML/CSS: Div doesn New topic
Author

HTML/CSS: Div doesn't expand to hold floated elements

ravil baizhiyenov
Greenhorn

Joined: Oct 22, 2009
Posts: 16
Hello everyone!

I have been reading this forum for a while now, and it has helped me to resolve a lot of my coding problems. However, i tried to find a solution to this (supposedly easy) div positioning problem, but couldn't...

I have the following markup:



Which produces this output:

So you can prob. see the problem already... The innermost div (which i highlighted green) wraps around a wrong element. It is supposed to include Sub-category Dropdown instead of the Category name textbox....

If you are asking why I am trying to make this layout, I want to make those divs invisible unless a user selects an appropriate category...

Would appreciate any suggestions.

Thanks!
ravil baizhiyenov
Greenhorn

Joined: Oct 22, 2009
Posts: 16
Ok... well i figured it out..
The problem was that i had

for a the form elements. I guess i have to learn css a little better =)
Haven't had too much practice with it yet, still trying to learn.
Now if someone could give me a hint why it was the case..... thanks!
ravil baizhiyenov
Greenhorn

Joined: Oct 22, 2009
Posts: 16
Just to close the topic, i guess, I will post the solution for everyone's reference.

http://ask.metafilter.com/134982/How-can-I-make-a-div-expand-vertically-to-fit-its-floated-content
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTML/CSS: Div doesn't expand to hold floated elements
 
Similar Threads
Managing the Firefox scrollbar with divs
scroll bar down
jQuery not working on page
problem in running a servlet
JSP Page to know what it does