I had actually thought about that and implemented it in that manner, but it didnt work,
Turned out that my application was making some ajax calls on whose completion, the view was getting populating with more values.
basically i wanted to make a parent whose height would fit that of its child but also leave a gap from the edges of the screen.
The right way i think would be to have the child give a notification to its parent when its elements are loaded completely...
The onload is fired initially before the sub-elements are loaded.
The worst thing i hate is that even a 1 px difference resolves into a vertical scrollbar and to make matters worse,
a vertical scrollbar introduces a horizontal one to compensate for that 20 px