Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

auto expand last div and apply scroll bar

Posted on 2012-12-22
2
Medium Priority
?
349 Views
Last Modified: 2013-02-08
I have a design with a outer container div and a number of child divs.

I want to last of the child divs to expand in height to fill in all remaining space whenever the browser resizes. This last child div can have content which is longer and therefore needs a scroll bar.

is this doable with only css, or does javascript have to be applied?
0
Comment
Question by:bhomass
[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 Comments
 
LVL 12

Accepted Solution

by:
Chris earned 1200 total points
ID: 38716944
More information would have been good here. IE. Does the container div have a set height? Do the child divs have a set height or max height? Are these divs supposed to fill 100% of the screen or can they overflow beyond that?

My understanding without this information is the following:

Parent div is set to 100% height so it always fits the screen.
Child divs have no specified height and will simply expand to fit their content.
Last child div wants to fill any remaining space down to the bottom of the parent div.

If I understand what you're trying to do then there's no way I can think of to manage this with css alone. Javascript is the way forward.
0
 

Author Comment

by:bhomass
ID: 38717350
ok, if so, can you reference some good articles to do this in javascript.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

721 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