Position:absolute without top/left/bottom/right values

后端 未结 4 1302
-上瘾入骨i
-上瘾入骨i 2020-12-16 05:57

I need to take an element out of the flow an am using position:absolute; for that.

Now if I just set position:absolute; without giving any

4条回答
  •  误落风尘
    2020-12-16 06:37

    The thing is that if you don't specify position, it's default value is static which doesn't allow you to specify any offset such as left, top... but if you don't need to specify offset, as it is in your case, then it is completly valid. On the other hand, if you want to specify offset then you also need to set position to something else than static.

提交回复
热议问题