Archived topic
Risk warning at the bottom of each page
5 replies · Started by Chris on February 27, 2019
Hi,
One of my websites is about CFD trading and my partners want me to add a risk warning at the bottom of each page that's always visible.
Here's an example: https://www.ig.com/nl/welkom-bij-ig (might need to use a VPN with a Dutch IP, not sure)
Here's a screenshot:

Any suggestions on how to accomplish this? Preferably without plugins.
Cheers
Hi there,
you can use a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
The after_footer hook will place it there.
Just add your HTML. If you want to style it so the content remains contained you can wrap it like so:
<div class="disclaimer-container">
<div class="grid-container">
<!-- your HTML -->
</div>
</div>
the grid-container class does the containment. And you can use the custom disclaimer-container to style it with some CSS.
Awesome David, yes I have the disclaimer at the bottom now using this code. Now I want it to be visible at all times, so it added this CSS (I'm a noob when it comes to that)
.disclaimer-container
{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: white;
color: black;
text-align: center;
}
It's stays visible now, but it overlaps the footer/copyright as you can see on the site. Can you help me with that please?
You can add some margin to the bottom of the body to match the maximum height of the disclaimer-container:
body {
margin-bottom: 40px;
}
YESSSS. You're my hero David! And as always thanks for this great theme.
Glad to be of help :)