c_rissy Posted June 21, 2021 Share Posted June 21, 2021 Site URL: https://cat-orca-hdkp.squarespace.com/ Hii, I can't seem to get this element to stick. I used this code but it doesn't seem to work. @media screen and (min-width:640px) { div#page-60ca8a1f11785674c0817e2e .col.sqs-col-4.span-4:nth-child(1) { position: sticky!important; top: 220px; } } PW: brineintopedro Link to comment
sorca_marian Posted June 22, 2021 Share Posted June 22, 2021 You can add a JavaScript code to add position fixed when the top of the element reaches the top of the browser. I tried with position sticky but the scenarios did not work 👨🔧👨💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
dearnaomichan Posted July 11, 2021 Share Posted July 11, 2021 @sorca_marian Do you have a solution using Javascript? Not using Jquery? Link to comment
sorca_marian Posted July 11, 2021 Share Posted July 11, 2021 9 minutes ago, dearnaomichan said: @sorca_marian Do you have a solution using Javascript? Not using Jquery? Yes 👨🔧👨💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
dearnaomichan Posted July 11, 2021 Share Posted July 11, 2021 (edited) @sorca_marian ok great because that would be extremely helpful! I am specifically trying to stick the A-Z element on the first section of this page (https://thehighguide.squarespace.com/glossary-a pw: guide) so it sticks at the top over the other section below it. I've make sticky elements within the same section, but never over other sections. But i've found that Jquery is extremely heavy and weights down the website. Thats why I asked about vanilla javascript. Any advice would be helpful, Thanks! Edited July 11, 2021 by dearnaomichan Link to comment
sorca_marian Posted July 12, 2021 Share Posted July 12, 2021 (edited) @dearnaomichan Yes, it is possible wit vanilla JavaScript. It would take me a few hours to achieve the result and for that amount of hours I request to be hired on Upwork. Edited July 12, 2021 by sorca_marian 👨🔧👨💻 Contact me for development work - I’m a Freelancer Software engineer, Architect, and Designer UI/UX 🙋♂️ Squarespace Custom Web Development & Design 📅 Manage Tasks, Take Notes, and Upload Related Images 📹 Squarespace Tutorials for free - YouTube📹 💯🚀 I have worked on over 200 Squarespace sites with custom code for over 9 years 🙋♂️ Let's connect on LinkedIn Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment