what different between absolute positioning and relatives positioning in css | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

what different between absolute positioning and relatives positioning in css

18th Feb 2019, 1:21 PM
abdul wahab mahmody
abdul wahab mahmody - avatar
2 Réponses
+ 2
Absolute uses coordinates of all page(or canvas) to determine position And relative uses the position of supporting block For example: You have some square somewhere in the middle of screen You want to place a smaller square in top-left position Absolute will place this little square in the top-left corner of page And relative will place it in top-left corner of the first square
18th Feb 2019, 3:02 PM
Дмитрий Мазыло
Дмитрий Мазыло - avatar
+ 1
What if there is no square in the middle of screen?
23rd Jul 2020, 5:05 PM
Riyad Rahman [π©]
Riyad Rahman [π©] - avatar