Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ravil baizhiyenov
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic