a div inside another div with absolute position will have absolute position too?

2

If I have a div within another div:

<div id="div1">
    <div id="div2"></div>
</div>

And for div1 I define absolute position:

#div1 {
    position: absolute;
}

Will div2 also have absolute position?

    
asked by anonymous 12.08.2017 / 19:50

1 answer

2

Not at all. Any html element has position as static , unless explicitly stated otherwise. Source , Source 2

It is also possible to confirm this as the sample html that placed the browser's inspect and accessed the computed css values:

    
13.08.2017 / 00:59