Did you layout them by selecting both and clicking on the layout-button or did you click at the container and clicked the layout button? The first way would lead to the behavior you are observing, the second would be the way of doing it.