DIV auto height expansion

Posted on 2010-11-24
Medium Priority
Last Modified: 2012-06-22
I seems my brain is wired not to handle automatic expansions of DIVs. What should I keep in mind when building web UIs to alway ensure that my DIVs expand?
Question by:Richard Lee
  • 2
LVL 52

Accepted Solution

Carl Tawn earned 2000 total points
ID: 34206314
If you mean expanding vertically to match the content then you basically just need to make sure you give them a:

    overflow: auto;

Expert Comment

ID: 34206342
Some browsers have issues rendering container divs properly, because of measuring bugs. Can you give an example?

For most scenarios, placing an empty at the end of container div with style="clear:both" do the magic. For example :

..some stuff..

<div style="clear:both;"></div>
LVL 18

Author Comment

by:Richard Lee
ID: 34206345
Why on earth can't I remember this :)!?
LVL 18

Author Closing Comment

by:Richard Lee
ID: 34206360
Overflow auto did the trick.

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question