Avoid content overflowing in mainContainer.