Replaced javascript heights solution with CSS flex solution.