Jump to content

css for middle item in a carousel

Recommended Posts

Hello,

Can anyone explain how i could change the css for the middle item that's displayed on screen in a carousel ?

For example i have 10 items but only 3 show on screen but i want to make the middle item bigger, but when i press next to view the other items i still want the middle item in view to be bigger. 

Link to comment
  • 1 year later...

In this case, because of the way that squarespace clips things, we need to make all the non-active ones slightly smaller. same effect, just safer with layout. I've transformed all slides to 90% of original size and forced the active one back to 100%. then added a transition to make it ease in and out.

Put this in your custom css. i've used the block id to make it just for that section, but you could remove that and it would apply to all carousels.

div#block-yui_3_17_2_1_1628511352168_11887 .sqs-gallery-design-strip-slide {
    transform: scale(0.9);
    transition: ease 0.5s;
}

div#block-yui_3_17_2_1_1628511352168_11887 .sqs-active-slide {
    transform: scale(1) !important;
}

To have the active slide centered, you don't need CSS. when edit the design of the carousel you can pick "Centered" for the property "Active Alignment" and that should sort that bit

 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

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.