It turns out that all of my containers were fine and not overlapping - it was due to the fact container 1 had very large font which overflowed the border and gave the appearance of overlapping the other elements. I noticed this after putting a red border around the affected elements and seeing that all the containers were stacked nicely as in the snippet. So, I defined the width and height of container 1 and made it large enough to fully contain the large text, and that pushed containers 2, 3, and 4 downward, as desired.