I started to work on the mobile view first, where I have a hero section that has two decorative svgs that are positioned absolute where their parent has a position relative, and when I finished I noticed that I have horizontal scrolling, I have tried to set the body width to 100% and set overflow-x: hidden on the body but the horizontal scrolling was still there, the only solutions I found is to set both body and HTML property of overflow to hidden, or wrap everything inside the body in a div and give it overflow: hidden.
My question is why this behavior occurs because I have always thought that if I set overflow-x: hidden on the body or the HTML element with hide any overflowing content