Solved

DIV auto height expansion

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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.
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…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

760 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

18 Experts available now in Live!

Get 1:1 Help Now