Can someone tell me why this is happening?

When I set margin for a child div element, it’s adding margin outside it’s parent div element. See link: Webflow - E3D

I have a div with a class of “split content” nested inside a div with a class “container” nested inside a div with a class “section”. When I add margin to the “split content” div shouldn’t it add the margin within the bounds of the “container” div or am I going crazy? It’s adding the margin outside the “section” div.

hi @Mack_BA your link returns 404

Hey Stan -

Sorry, link updated: Webflow - E3D

See how the section below nav bar is behaving. I can’t figure out why.

hi @Mack_BA margins behaviour can be sometime confusing. Here is a video where I explain in short what is going on but feel free to find more articles or videos about this topic on net.

Hope you will have now better understanding how margins works.

Marry Christmas and Happy New Year :christmas_tree:

Hi Stan - I just spotted this. Thank you very much for this detailed explanation, it’s very helpful! I hope your new year is off to a good start!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.