Adjusted to allow CSS em height elements and for animation when resized