Solved

Put some white space between images in WordPress footer content

Posted on 2016-11-11
2
67 Views
Last Modified: 2016-11-24
Hi All

I have removed an image permanently from a site but now all of the images have shifted to the left.

I would like to add blank spaces between the images equally across the screen, I have found quite a few references on google but refer to older versions than the one I am using (WordPress 4.6.1) or people have coded differently in HTML

Here is some sample code of 2 out of the 4 images of which I want to add the spacing between, could someone please advise how I would do this

<div id="footer-one-image"><a href="http://www.lindahillfitness.co.uk/health-check" target="_parent" border="none"><img src="http://www.lindahillfitness.co.uk//website_images/footer-one-pic3.jpg" width="184" height="180" border="0" alt="Health check" title="Health Check"></a>
<p class="footer-one-text"><a class="footer-one-text" href="http://www.lindahillfitness.co.uk/health-check" target="_parent" border="none">Health<br>check</a></p></div>

<div id="footer-one-image"><a href="http://www.lindahillfitness.co.uk/wellness" target="_parent" border="none"><img src="http://www.lindahillfitness.co.uk/website_images/footer-one-pic4.jpg" width="184" height="180" border="0" alt="Wellness" title="Wellnessl"></a>
<p class="footer-one-text"><a class="footer-one-text" href="http://www.lindahillfitness.co.uk/wellness" target="_parent" border="none">Wellness</a></p></div>

Open in new window

0
Comment
Question by:IM&T SRFT
2 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 41884227
You can either add padding or margin around your images.  You should have a child theme to modify and add css.

To add padding to all images
img {
   padding:20px;
}

Open in new window


To target your footer images only
#footer-one-image img {
   padding:20px;
}

Open in new window


Your code above have 2 div's with the same id. Perhaps you have that just from making a sample, but id's need to be unique. Classes can be the same.

Creating a child theme if you have not done so already is easy.  Make a new folder that  matches the current theme and add a "-child" and follow the instructions here to add a css and other files https://codex.wordpress.org/Child_Themes.  By using a child theme, when you  make modifications, they will not be overwritten when you update the parent theme.
0
 

Author Comment

by:IM&T SRFT
ID: 41888203
Thank you for the response

Sorry for the silly question but where do I place this code?

img {
   padding:20px;
}

Someone else designed the website so I will investigate their use of the same ID's
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question