Solved

Put some white space between images in WordPress footer content

Posted on 2016-11-11
2
25 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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now