resize is controlled to avoid divs' overflow