• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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
 
I was her plaything! And so was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic