Added code to make sure elements resize while window size changes