Improved resize functionality to handle responsive site resizing.