Sticky title doesn't stick
-
Hi everyone!
I'm trying to make a title sticking at the top of the browser after scrolling down.
I don't want to use "position: fixed" because I'd like the title to scroll a little bit up from its original position.I've wrapped the text element in a custom id in the editor, and i'm using "position: sticky" in css, but the title is still scrolling out of the page. Also tried to do this just on the text element with the title, and on the entire row, but nothing works.
Any suggestions?
Thank you!
FEdit: I'm using Chrome 68 on Mac, but I experienced the same problem on Safari and Firefox too.
-
Dear @fabiofrl
I am not sure how much supported the sticky is.
I also don't think that you can scroll with the sticky. As far as I understood it just pushes the content down and then stays on the top.Are you sure that you cannot sue the fixed thing?
Best!
Marius
-
Hi @mariusjopen
thanks for the reply!I was looking for something like this (with no js needed), I've tried a couple of different solutions but nothing works.
Btw I've already switched the layout to a different design, so this is not an issue anymore.Thanks again!
F -
Hi @fabiofrl
I would recommend the jQuery solution. very simple. Anyway… You don't need it anymore :-)Best!
Marius
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it