0
hello, about floating in css, I wanna know why these img&<p> margins are different.
https://code.sololearn.com/Wm0DAbzkQ6ZQ/#html I made border appeared, and I realized that the top margins of img and p are different. img is upper and p is slightly lower. Is it normal? thank you
2 Respuestas
+ 1
That is because of the default margin set by html.
Check thjs: https://code.sololearn.com/W4Mqg143nA59/?ref=app
If you clear the default mARGIN using universal selector i.e. *, and set the custom mARGIN, you can see they will have same amount of margins at the top.
+ 1
thank you!