setting main container height dynamically