What is the difference between "relative and absolute" position in css? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between "relative and absolute" position in css?

currently I am doing projects in JavaScript..In our SoloLearn they were explained about css positions.could anyone please clear this?

13th Mar 2018, 4:18 PM
Thiru Arasu
Thiru Arasu - avatar
1 Answer
+ 2
Relative positioning is generally relative to the elements around it. So if you apply this to a divorce for example, and there's another div in front of it, it will push the div downwards. With absolute positioning it will remain in the same place unless specified in the css.
13th Mar 2018, 4:33 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar