CSS DIV Height in Percent

APD Toronto
APD Toronto used Ask the Experts™
Hi Experts.

How can I make an inner DIV span to a 100% height?

Example, http://codepen.io/AleksPoposki/pen/Opovpv?editors=1100

You will see that I've  set up #outer to grow, in this case according to #inner1. But, how can I make #inner2 the same heigh? Do I need flex?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
.Net Senior Developer
you need to set the parent height in a fixed size, in your case:

  background-color: red;
  overflow: auto;
  height: 200px;

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial