0

i dont underatand what the diffrent between margin-top and top

if i put top:10px or margin-top 10px the result is same. p{ position:relative ; padding:20px; max-width:40px; border-style:solid ; top:10px; }

1st Oct 2016, 8:53 PM
ran gantz
ran gantz - avatar
2 Respostas
+ 4
top is only for relative and absolute position. it moves all block without any effects on parent or changing size of block. margin works everywhere and may change size of block depending on location of other elements. to some up, they will work differently if there are a lot of blocks on the page
1st Oct 2016, 9:18 PM
Константин Колобов
Константин Колобов - avatar
+ 1
Что это?
2nd Jun 2017, 3:01 PM
Atham
Atham - avatar