html - Fix two divs to the bottom and top of another div -


i'm looking fix 2 divs bottom , top of div.

fiddle

<div id="subg">     <div id="subup"> ttttt </div> //this fixed on top of parent div     <div id="subgh">          <img src="">     </div>     <div id="subdwn"> bbbb </div> //this fixed @ bottom of parent div </div> 

css:

#subg{     height: 100px;     overflow: hidden;     overflow-x: hidden;     position: relative; } #subgh{     height: 99%;     position: absolute;     overflow: auto;     top: 0px;     bottom: 0px;     left: 0px;     right: -15px; } #subup #subdwn{     position: relative; } 

so final this:

enter image description here

try demo, looking for. demo

#subup{     position: absolute;     top: 0; } #subdwn{     position: absolute;     bottom: 0; }