Archived topic
Image above footer
3 replies · Started by Enrico on October 18, 2020
Hi there,
first of all I apologize for my English, I know it's not the best...
I'm trying to add an image just above the widget footer area and below the container.
I edited the footer.php file (child theme) and just under
<?php
/**
* The template for displaying the footer.
*
* @package GeneratePress
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
</div>
</div>
I added this line of code:
--- img src="/wp-content/uploads/footer.png" alt="footer silhouette" width="2000" height="122" ---
I don't know if this is the best way to do what I want to do...
Anyway, as you can see on my site, there is awhite space between the widget foote area and the image.
How can I hide that white space?
Thank you.
Hi,
I've inspected the site and the <img> html tag itself seems to be the one causing issues.
We can do a workaround to avoid this by placing the image as a background-image of a div.
You can try this markup code:
<div style="width:100%; height:120px; background-size: cover; background-position-x: center; background: url('https://www.guide-dolomiti.it/wp-content/uploads/footer.png');"></div>
Hi Elvin,
thank you very much, it works perfectly!
All the best.
Enrico
Glad its working for you.
No problem. :)