Win a copy of Head First Android this week in the Android forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And 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
reply
    Bookmark Topic Watch Topic
  • New Topic