- This topic has 8 replies, 2 voices, and was last updated 1 year, 7 months ago by
David.
-
AuthorPosts
-
November 25, 2020 at 4:37 am #1545968
Ruben
Hi there,
I have the content of my website merged with the header, so the header is always on top, with a transparent background.
On a few pages I pushed some interactive content behind the header:
https://www.lamirateca.com/beta/trabajos/
Those elements are now behind the header and I cannot reach them and click on them. I have been playing around with their z-index but nothing seems to work.
Is there any way to be able to reach and interact with an element behind the header and still have the header on top the rest of the content when I scroll?
Thank you.
November 25, 2020 at 6:54 am #1546418David
StaffCustomer SupportHi there,
an elements z-index is relative to its container, so z-indexing won’t work. You would have to move the entire page container in front of the header, which is no good.
Instead you will need to absolute position the filter buttons:
.jig-filterButtons { position: absolute; top: 50px; left: 50%; transform: translatex(-50%) !important; } #jig1 { margin-top: 100px !important; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 30, 2020 at 4:40 am #1558083Ruben
Hi David,
Thanks for this. It worked perfectly.
I have been trying to do the same in the store page (https://www.lamirateca.com/beta/shop-categoria/almacenaje/), to bring the woocommerce filter toggle in front of the header but I don’t seem to be targeting the right element:
.prodctfltr_wc { position: absolute !important; top: 50px; left: 50% ; transform: translatex(-50%) !important; } #wc-column-container ul{ margin-top: 50px !important; }
Any idea of what I am doing wrong?
Thank you.
November 30, 2020 at 5:46 am #1558202David
StaffCustomer SupportThe CSS class is incorrect. It should be:
.prdctfltr_wc
However, you won’t be able to absolute position that element as it also contains the off canvas panel.
Instead you would need to target just its title element – something like this:
.prdctfltr_wc .prdctfltr_filter_title { position: absolute; z-index: 1000; top: -20px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 30, 2020 at 6:43 am #1558298Ruben
Hi David,
Thanks for the quick reply, but that code is not working for some reason.
November 30, 2020 at 6:56 am #1558574Ruben
So after further trying when I add the code in the WordPress Customizer it doesn’t work, but if I add it in the Chrome browser style inspector it does work. Am I missing something?
November 30, 2020 at 7:42 am #1558668David
StaffCustomer SupportTry adding the code to very top of your CSS Code.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 30, 2020 at 8:21 am #1558726Ruben
And that did the trick 🙂
Thank you so much!
December 1, 2020 at 2:21 am #1560017David
StaffCustomer SupportGlad to be of help
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.