Why is CSS positioned to grand ancestor and not immediate ancestor?
Context
I'm watching a MERN stack Udemy course and we are on CSS. we are building a little blog post but I'm getting stuck on one specific part.
Using Safari and tried chrome
Issue
The issue I am facing is that the button in the div alert is being put to the right of the div called container and not the right of the div called content. I glance back at the instructor's code but it seems identical.
I asked chatGPT and it said that when you use position: absolute it makes the position based on the ancestor which is the reason why I don't understand what is wrong cause the ancestor is content.