0
why float margin not working perfectly while using "left" value?
Edit this code and convert "right" into "left" then margin will not work. why is that? And also when image is at right side, "margin-right" and "margin-top" are also not working, why? Is it because float only work for right side and left side? https://code.sololearn.com/WGwEkcdiz7a8/?ref=app
1 ответ
+ 2
its working, you're missing the measuring unit though, add px or something. the code right now your image doesnt have a margin because of that reason.
what make it seems like float right has margin is because of the text. the text doesnt end at the very edge of the image when start a new line and that's normal, but it make it seems like the empty space left by the text is the margin of the image. thats why the margin doesnt seems to exist when the image float on the left, because the line of text starts at the very edge of the image.