use max-height - it wasn't buggy after all