Change height of a div according to outer div in angularJS -


i have div has flexible height , 2 div's inside it. first 1 has fixed height of 60px, second ones height should contain other left area inside outer div. need angularjs answer, not javascript or jquery

i looked @ forms , there written cases in outer div browser window. tried write directives myself no solution.

would appreciate answer or suggestion.

html code

<div ng-app = "myapp" id = "outer" ng-style = "styleouter()">    <div id = "first" style = "height: 60px">first content</div>    <div id = "second" ng-style = "style()">second content</div> </div> 

outer div: styleouter() function in angularjs directory sets outer divs height "windowsize-100px"

first div: height fixed (60px)

second div: style() function in angularjs directory should set second divs height "outerdivsize - 60px"

i'm posting this solution answer. it's second version of fiddle posted before in comment.

i'm sorry @pixelll, i'm sure overthinking things. if know size of outer div (windowsize-100px) , fixed div (height: 60px) thing need inner div set css position of it's parent anything (this, creating new positioning context) , within new context should absolutely position inner div bottom: 0. think that's it.


Comments