• Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

Sticky Offset Responsive

3

3quid

New Member
Hi,

Creating a sticky section with offset. You can choose to turn on/off sticky per device but does anybody know a way of setting a different sticky offset for tablet/mobile?
 

Attachments

  • Screenshot 2020-06-19 at 17.32.15.png
    Screenshot 2020-06-19 at 17.32.15.png
    67.9 KB · Views: 509
P

Persuasion89

New Member
maybe you could make it work with @media queries and

{#sectionid}.elementor-sticky {
sticky_offset: 000px;
}

You might have to do a little more digging to get the actual code right. That's at a glance what id try. don't bother with the sectionid part unless you have a few stickies and have trouble.
 
3

3quid

New Member
Thank you @Persuasion89 ... I was trying to solve it via elementor only but clearly this isn't possible at this time. I've now solved it by adding ID's to sections (e.g. product-section-title) and, alongside media enquiries, using the following code in my css...

Code:
/* Desktop 200px offset */ 
@media only screen  and (min-width : 1026px) {  #product-section-title  { position: -webkit-sticky; position: sticky; top: 200px;  }
}
 

Latest Resources

Other Elementor Resources

elementor official

Still stuck? Ask the forum

Post your question with a screenshot and a link if you can, and a member will usually reply within a day. Free to join, no sales pitch.

Create a free account
Top