- This topic has 13 replies, 4 voices, and was last updated 3 years, 6 months ago by
David.
-
AuthorPosts
-
May 9, 2020 at 11:57 am #1277118
Luke
Hi.
I have two sticky banners in the widget on the right hand side of the page. Right now I am using Q2W3 Fixed Widget plugin to make these banners sticky. Is there something I can do to make these banners sticky without using the plugin? I’d like to deactivate this plugin but I don’t know what to do to make the banners sticky without the plugin? Maybe I need some special code? These two banners are in the same widget.May 9, 2020 at 4:36 pm #1277296Leo
StaffCustomer SupportHi there,
A plugin is likely the best way to go.
This is the one we usually recommend though:
https://en-ca.wordpress.org/plugins/sticky-menu-or-anything-on-scroll/May 9, 2020 at 9:54 pm #1277434Luke
You think I should change my plugin for the one that you recommended? I’ve noticed that the sticky banner overlaps the footer and I am also not sure if I should disable it for mobile devices?
May 10, 2020 at 9:35 am #1278071Leo
StaffCustomer SupportThat’s your call 🙂
May 10, 2020 at 12:49 pm #1278240Luke
Ok, but do you know what I can do to stop the sticky banner from overlapping the footer? You can check the link and scroll down to the bottom of the page.
May 10, 2020 at 1:54 pm #1278284Leo
StaffCustomer SupportNot sure if I’m seeing the issue.
This is what I’m seeing at the bottom of the page:
https://www.screencast.com/t/KifgA4P7rnwIs that not what you are seeing?
May 10, 2020 at 2:08 pm #1278291Luke
Are you using a smartphone? I think the widget on the right hand side of the page is not visible on the smartphone? Correct me if I’m wrong. I use a laptop and when I scroll to the bottom of the article the sticky banner overlaps the footer. I would send you a screenshot but I don’t know how to do it here.
May 10, 2020 at 4:11 pm #1278352Tom
Lead DeveloperLead DeveloperThose plugins usually have an option to add the footer selector, which prevents them from overlapping it. In our case,
.site-footer
is the selector you would use.Alternatively, you could try this, but browser support isn’t as good as javascript (which those plugins use):
#text-24 { position: sticky; top: 0; }
May 10, 2020 at 9:57 pm #1278487Luke
What am I supposed to do with this code `#text-24 {
position: sticky;
top: 0;
}`Add it to CSS?
May 10, 2020 at 10:06 pm #1278495Luke
But in the setting for this plugin there is something like “Stop ID … You need to provide the HTML tag ID here. The position of that HTML element will determine the margin-bottom value.”
May 10, 2020 at 11:15 pm #1278542Luke
I entered the ID “footer-widgets” in the Stop ID field and it looks like it’s working. The only problem is that the last banner is affecting the footer beneath it, i.e. everything beneath that last sticky banner is clickable and the link is the same as the link of that last banner. But it’s not a big problem I think.
May 11, 2020 at 8:58 am #1279386Tom
Lead DeveloperLead DeveloperThat seems to be happening because there is broken HTML in the banner.
Make sure there’s a closing
</a>
element for the opening<a>
element.May 11, 2020 at 11:47 pm #1280289Luke
This is the code of my 2 banners. The banner at the bottom is affecting the footer beneath it, i.e. everything is clickable … Please have a look and tell me if everything’s OK with these two codes:
<a href="http://mywebsite.com/pagewithanoffer/" target="_blank"> <img style=" height: 350px; width: 100%;" src="https://mywebsite.com/wp-content/uploads/2020/05/banner.png">
<a href="https://mywebsite.com/pagewithanoffer/" target="_blank"> <img style=" height: 180px; width: 100%;" src="https://mywebsite.com/wp-content/uploads/2020/05/banner.png">
May 12, 2020 at 2:59 am #1280454David
StaffCustomer SupportHi there,
as Tom said you’re missing a closing
</a>
For example your first HTML code should look like this:
<a href="http://mywebsite.com/pagewithanoffer/" target="_blank"> <img style="height: 350px; width: 100%;" src="https://mywebsite.com/wp-content/uploads/2020/05/banner.png"> </a>
-
AuthorPosts
- You must be logged in to reply to this topic.