0

I have,

HTML,

<div class="outer">
    <div class="inner"></div>    
</div>

CSS,

.outer {
    position: relative;
    overflow: scroll;    
    border : 1px solid red;
    height: auto;
}
.inner {
    position: absolute;
    width: 1200px;
    height: 895px;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    border : 1px solid yellow;
}

Issue : - Outer does not take complete height of inner content

Expected : - It should take complete height

Note

I can not hard code outer height

I want a scrollbar on outer.

http://jsfiddle.net/sefkao23/

Deepak Ingole
  • 14,912
  • 10
  • 47
  • 79

1 Answers1

0

Hi now try to this way

You just define your .outer class width or height as like this

.outer {
    position: relative;
       height: 895px; 
    border : 1px solid red;
    width: 1200px;
}
.inner {
    position: absolute;
    
   
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    border : 1px solid yellow;
}
<div class="outer">
    <div class="inner"></div>    
</div>
Rohit Azad Malik
  • 31,410
  • 17
  • 69
  • 97