Solved

DIV auto height expansion

Posted on 2010-11-24
4
304 Views
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?
0
Comment
Question by:Richard Lee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 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;
0
 
LVL 5

Expert Comment

by:buraksarica
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 :

<div>
....
....
..some stuff..
....

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

Author Comment

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

Author Closing Comment

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

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

691 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