Jump to content

How to change the order of a carousel in CSS?

Recommended Posts

Site URL: https://shop.jonathan-gallagher.com

I have a gallery carousel, Brine,  that changes the number of images visible depending on the screen width.

I'd like one image to always be on the carousel when first viewed. It would be simple enough if this was always the first image, on the left of page, however that's not the case here.

For example, I'd like it to be at position 6 out of 6 on desktop, and going down to position 3 out of 3 on phones.

I was planning to use a reorder css, and have tried to find a "child" parameter in the inspect css, but no luck.

e.g

   .carousel image:nth-of-type(6) {
    order: 3;
  }

 

Any help greatly appreciated

 

Link to comment
  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

4 hours ago, JonJonJon said:

Site URL: https://shop.jonathan-gallagher.com

I have a gallery carousel, Brine,  that changes the number of images visible depending on the screen width.

I'd like one image to always be on the carousel when first viewed. It would be simple enough if this was always the first image, on the left of page, however that's not the case here.

For example, I'd like it to be at position 6 out of 6 on desktop, and going down to position 3 out of 3 on phones.

I was planning to use a reorder css, and have tried to find a "child" parameter in the inspect css, but no luck.

e.g

   .carousel image:nth-of-type(6) {
    order: 3;
  }

 

Any help greatly appreciated

 

Can you share the protected password for us to have a look?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 2 weeks later...

@tuanphan thanks, it is the same carousel that you aided me with repositioning the arrows on. The image that it part of the carousel, that has the text in, "join in...", is the image that I'd like to maintain it's position always on the far right, yet still be part of the same carousel, rather than a separate individual element. so it scrolls with the rest.

I had hoped this might be able to be controlled with CSS?

 

I'm happy to be able to define it's position, that I can then alter based on the media queries, if that's an easier solution.

e.g

   .carousel image:nth-of-type(6) {
    order: 3;
  }

but I can't seem to find a property where a carousel uses children, so I'm not really sure what's the solution

Screenshot 2021-11-10 172714.png

Edited by JonJonJon
Link to comment
On 11/11/2021 at 12:30 AM, JonJonJon said:

@tuanphan thanks, it is the same carousel that you aided me with repositioning the arrows on. The image that it part of the carousel, that has the text in, "join in...", is the image that I'd like to maintain it's position always on the far right, yet still be part of the same carousel, rather than a separate individual element. so it scrolls with the rest.

I had hoped this might be able to be controlled with CSS?

 

I'm happy to be able to define it's position, that I can then alter based on the media queries, if that's an easier solution.

e.g

   .carousel image:nth-of-type(6) {
    order: 3;
  }

but I can't seem to find a property where a carousel uses children, so I'm not really sure what's the solution

Screenshot 2021-11-10 172714.png

Try adding to Design > Custom CSS

section#join-in {
.summary-item-list {
    display: flex;
}
/* item 1 */
.summary-item:nth-child(1) {
    order: 3;
}
/* item 2 */
.summary-item:nth-child(2) {
    order: 1;
}
/* item 3 */
.summary-item:nth-child(3) {
    order: 4;
}
/* item 4 */
.summary-item:nth-child(4) {
    order: 5;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

@tuanphanThanks. This partially works. The flex kind of breaks having a fixed number of items per row, instead it shows them all. I have managed to define the number per row, but not limit it to just one row. The the ordering also doesn't seem to behave predictably. Any further suggestions would be greatly appreciated. thank you

Link to comment
  • 3 weeks later...

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.