Tuesday, 20 May 2014

Blogging Tips: How to Remove White Space Between Images Using CSS

The pesky large gaps between images are the bane of many bloggers lives. I have tried for so long to remove these spaces because I think it gives a much more professional feel to my blog. It's the little changes that you add to your blog that improve the design and attract people in, and I believe this is one of them.

If you read my previous blogging tips post on how to centre post titles and dates, you will know that I made up my own CSS code and it worked (I was shocked too). Well, I did it again. A round of applause please. I decided I should share my newfound knowledge in the hope that it will help some of you. 

There is one issue - this CSS code didn't work for me when I had my post titles and dates centre-aligned. I don't know if it is just that these two codes don't work together (it seemed to be one or the other but put both in and only one would work) or if it is the theme that I have on my blog. It would be interesting to know if it works for you if you try both. Now, on to the tutorial. It is really really simple, you'll be glad to hear.

All you need to do to achieve this is follow these simple steps.

1. Go to your blog template a click 'customise'.
2. Click 'Advanced' and then 'Add CSS' which is right at the bottom of the list.
3. Past in the following code and hit enter.
     .post-body img {
     padding: 0 !important;
4. Save the settings and voila! It should be complete.

I cannot guarantee that this will work for everyone. I'm not entirely knowledgeable on CSS, I simply took inspiration from other CSS that I use on my blog and came up with this so I don't know if it is maybe the case that this code doesn't work in conjunction with some other ones. Let me know if this works for you though because that would make me very happy indeed.

No comments

Post a Comment

Thank you so much for spending your precious time reading my rambles. Go ahead and leave me a little comment if you like and I will reply to any questions that you may have. Just make sure to check the 'Notify Me' button!