updated example to be more robust, fixed css transition fixed height