Archived topic
Make entire background image a link
7 replies · Started by Daniel Häckel on June 13, 2020
Hi,
is it possible to make the whole background (only on home) a link?
No matter where you click, a redirect should take place.
Thank you:-)
Hi there,
Not sure if I understand.
Any chance you can link us to the site in question?
You can edit the original topic and use the private URL field.
Let me know :)
Hey Leo,
thanks for your help!
the site is under construction - so it doesn't work yet, sorry.
I want to link to the blog-page, no matter where a visitor is clicked on the landingpage.
Like a huge transparent button on the entire page.
Maybe by the Z value ...
I have to link all the components on the landingpage - including the background. Is there any chance to solve this?
THX
Dan
I'm not sure if I've seen a solution like this, unfortunately.
Hey Leo,
something like a ghost button?
Hi there,
you can use a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
To add a hidden link that covers the entire view:
<a href="URL" class="full-page-link">Hidden Link</a>
<style>
body {
position: relative;
}
.full-page-link,
.full-page-link:hover {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
color: transparent;
}
</style>
Select the after_footer hook
Hi David,
I'd like to ask you if this code can be modified so that the link appears only on the background of the page - only on the left and right side of the main content of the pages (such as on these pages on a purple-black background - https://stavimbydlim.cz/prumerna-spotreba-vody-na-osobu/)
Thank you.
Have a nice day.
Martin
Hi Martin,
check my response here:
https://generatepress.com/forums/topic/background-ad/#post-1787936