When I made a page today, I encountered a problem: div cannot absolutely locate the parent object.
<Div id = "fa">
<Div id = "so" style = "position: absolute; top: 0; right: 12px">
</Div>
</Div>
However, no matter how you adjust the settings, the system locates the body and is depressed!
After reading the css Manual, I didn't find anything wrong. I checked it online and found this sentence: absolute disconnects from the document stream, locates through top, bottom, left, right, and selects its most recent parent-level positioning element, when the parent position is static, the absolute element locates at the origin of the body coordinate, and hierarchical classification can be performed through z-index.
After reading the code, the code is changed as follows,
<Div id = "fa" style = "position: relative;">
<Div id = "so" style = "position: absolute; top: 0; right: 12px">
</Div>
</Div>
A low-level mistake! Shame! Is my css Manual too old?