Jump to content

Sticky Columns in Fluid Engine?

Recommended Posts

https://beehyve.squarespace.com/payment-policy

I want to add a sticky sidebar (made of various blocks) and apply it to multiple pages.

In 7.1 classic editor, I could make the sidebar blocks collectively sticky by targeting the column within the section, using the code below. Super quick and easy.

Is there a way to do this in fluid engine? Feels a lot cleaner than having to target each block for different top heights, especially as I want to add it to a few pages.

section[data-section-id="...."] .sqs-layout > .sqs-row > .sqs-col-3 {
	position: sticky!important;
	position: -webkit-sticky!important;
	top: 140px;
    z-index: 99999;
    }

Thanks all!

Link to comment
  • Replies 3
  • Views 1.6k
  • Created
  • Last Reply

Top Posters In This Topic

Do Sidebar as first block, then use this code

section[data-section-id="...."] .fluid-engine>.fe-block:first-child {
	position: sticky!important;
	position: -webkit-sticky!important;
	top: 140px;
    z-index: 99999;
    }

First block means block which you added first in that section. 

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
  • 7 months later...

Hi @tuanphan ! Thanks for sharing this piece of code - useful as usual ! 

I applied it to a website I'm currently working on, using :last-child instead.

section[data-section-id="...."] .fluid-engine>.fe-block:last-child {
    position: sticky!important;
    position: -webkit-sticky!important;
    top: 140px;
    z-index: 99999;
    }

 

I have in this column two text blocks and a form block. The code only applies to the form block. 😅

Is there something I'm missing here ?

Website is https://bear-lanternfish-zpj9.squarespace.com/entreprise-coaching-professionnel 
Password = inesse.
This is the third section.

Any feedback would be appreciated ! 🙏🙏

Thank you !
Laura

Link to comment
On 9/29/2023 at 10:14 PM, Laura16Bits said:

Hi @tuanphan ! Thanks for sharing this piece of code - useful as usual ! 

I applied it to a website I'm currently working on, using :last-child instead.

section[data-section-id="...."] .fluid-engine>.fe-block:last-child {
    position: sticky!important;
    position: -webkit-sticky!important;
    top: 140px;
    z-index: 99999;
    }

 

I have in this column two text blocks and a form block. The code only applies to the form block. 😅

Is there something I'm missing here ?

Website is https://bear-lanternfish-zpj9.squarespace.com/entreprise-coaching-professionnel 
Password = inesse.
This is the third section.

Any feedback would be appreciated ! 🙏🙏

Thank you !
Laura

Which section are you referring to? Or you mean section with left text right image under ME CONTACTER button?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.