bobbykimani Posted February 10 Share Posted February 10 The sticky code I used to make the section with the search bar stick in place doesn't seem to be working anymore. The code is working on all the other pages. Any suggestions? This is the code I am using that seems to no longer be recognized on the home page, it's fine on all the other pages. <style> section[data-section-id="63a610e521c4b266a9e1c17e"] { position: -webkit-sticky!important; position: sticky!important; top: 10px; z-index: 99999; } </style> https://www.bikefactoryhawaii.com/ Link to comment
Ziggy Posted February 10 Share Posted February 10 The section ID is wrong if that code is for the homepage, this is the correct one: section[data-section-id="63a610e521c4b266a9e1c17e"] Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
bobbykimani Posted February 10 Author Share Posted February 10 3 hours ago, Ziggy said: The section ID is wrong if that code is for the homepage, this is the correct one: section[data-section-id="63a610e521c4b266a9e1c17e"] This is the same section ID in my code or am I overlooking something? <style> section[data-section-id="63a610e521c4b266a9e1c17e"] { position: -webkit-sticky!important; position: sticky!important; top: 10px; z-index: 99999; } </style> Link to comment
tuanphan Posted February 12 Share Posted February 12 It already worked, however because top 10px so it is behind your header, you can increase it to 144px (144 is header height) bobbykimani 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
bobbykimani Posted February 13 Author Share Posted February 13 On 2/12/2024 at 2:55 AM, tuanphan said: It already worked, however because top 10px so it is behind your header, you can increase it to 144px (144 is header height) Thanks! How did you measure/find the header height? The adjustment worked. Link to comment
tuanphan Posted February 15 Share Posted February 15 I inspect Page Source Code to find this...or you can use tool to measure it, eg: Lightshot tool (this tool takes screenshot, but it can show element width/height) Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) 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