fix resize function and properly position masthead