Home › Forums › CSS › Noob question but do I always have to add padding to images in css ? › Reply To: Noob question but do I always have to add padding to images in css ?
November 18, 2019 at 2:45 am
#299168
Participant
I guess for images using padding or margin would end up in the same result. Though reading the documentation on margin and padding I would recommend margin for this. Since padding is the space inside the box and margin is the space outside of the box.
See some documentation here https://medium.com/frontendshortcut/margin-vs-padding-c1fc8ea8bfaf for example.
Keep in mind that an image is an inline element by default.