If I use margin-top etc. instead on the inner part, I do not have the problem, and the wrap container grows with the moving inner part.
So problem solved.
But I would like to use position:relative; in the wrap container and would like to move the inner part with top:; etc.
Why is using
position:relative so important? It’s a very poor method of laying out elements unless it’s for a specific effect.
The point of position:relative is that it moves the element visually but not in actuality. That’s why the wrapper doesn’t grow.
You can see the difference here: