Aoi Asano
7,477 PointsImage padding in html?
So, I tried to do padding with html by <hspace> for my CMS posting, but just found out that html5 does not support it anymore.
Is there any way I can do within html to add padding on image? I know I can do it with CSS easily, but I'm not familiar with CMS, so I guess I have to do it in inline.
Any suggestion please?
3 Answers
Kevin Kenger
32,834 PointsHey Aoi,
You could add an inline style to your HTML tag using CSS, which wouldn't require an external style sheet.
<img src="whatever.jpg" alt="whatever" style="padding: 10px;">
Freek Wevers
Courses Plus Student 14,599 PointsAlthough Kevin's answer is correct, I still recommend using a style sheet. It's just good practice to keep your semantics (HTML) separated from your layout (CSS). If you put all your styles inline then it's going to give you a headache when you need to make some style changes later on. I'd suggest to spend some time to get to know your CMS and figure out how to add the style sheet I think you need. It's going to save you time in the long run...
Aoi Asano
7,477 PointsKevin, Thanks a lot, this totally worked!
Freek, Yea, that's what I am thinking also,,, I guess I gotta familiarize myself with this CMS (Drupal). It is just too complicated to figure out to me haha