Solved

DIV auto height expansion

Posted on 2010-11-24
4
263 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now