Streaming live at 10am (PST)

Absolute Positioning of a Child Div-Block

True or false?

If I want a child div-block to be positioned absolutely somewhere within the bounds of its parent div-block, the parent div-block must either be set to absolute, relative, or sticky. I have a parent div-block set to static, but when I set the child div-block to absolute and then click the top-right-position button, the child div-block skyrockets all the way to the top-right of the body. I figured the parent would contain any kind of child element regardless of the parent’s position setting. If the answer to the top statement is “true,” then what the hell? Why must a parent div-block must be set to either absolute, relative, or sticky? Should I try putting the parent div within a section, making it a child of the section?

I don’t get the logic of why this is behaving this way. Help!

Thanks :cat2:

Hi @Meowface_Sam these are basics of CSS positioning and has noting with WF. I will recommend to learn at least basics and search internet first before you place request. Consortium that deciding what will be a standards of WEB is called W3C.

You can complain to them that they did wrong decision.

In meantime here is link to W3C working Draft from 2020 what is and how we can use positioning.

If this will be for you too technical you can take any CSS course to learn it the way that you will understand.

Hope you fill find this link helpful.

1 Like