Solved

Put some white space between images in WordPress footer content

Posted on 2016-11-11
2
77 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

732 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