Does every DIV have a relative position?

5

I heard from a development professional that:

  

"All div is relative, even without you setting position:relative "

Is this correct?

    
asked by anonymous 04.07.2014 / 16:24

3 answers

2

No, because when you apply:

div{
    top:100px;
    left:200px;
}

a div does not appear to change, whereas in:

div{
    position:relative;
    top:100px;
    left:200px;
}

is noticeable.

    
04.07.2014 / 16:36
11

Wrong, in HTML to position default (by default) is position: static;

Reference: W3C

    
04.07.2014 / 16:34
3

The default position is static for any HTML element, if not explicitly specified

position: static;

JSFiddle

    
04.07.2014 / 16:36