Added size check for improving page padding on smaller screens.