Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

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 ?

#299168
JeroenR
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.