You have a section made of a section element, a container and 3 dynamic images that you’re pulling from the CMS.
It’s logical that when there’s no images defined for an item, no content shows up.
However, your invisible structure of a section element and a container element is still there, and any dimensional property such as width, height, padding and margin will make them take some room on the page.
You could prevent this to happen by not setting any dimensional property on html elements other than the dynamic ones, so that when there’s no dynamic content to show, html static elements would take zero space and be unnoticeable. However, this is not a practical solution.
The good practice
You’re going to use conditional visibility to hide the whole section when there’s no dynamic content. It is safe to assume that is there is no Web Image 1, then there won’t be a image 2 or 3, right? So let’s define this rule:
Only display the section when there’s something defined for the Web Image 1 Collection field (image field not set).
To do this, select the Section element and do this:
And the conditional filter in detail:
Conditional Visibility feature is an essential tool of CMS development. You should look into it an be sure you understand all the possibilities it offers. You use case of not showing something when it’s empty or elements is a very common one.