Jump to content

Product navigation arrows not accessible - add white background behind arrows

Go to solution Solved by tuanphan,

Recommended Posts

Product navigation arrows are black so appears fine on images with lighter backgrounds but on darker background they're not accessible.

A simple solution would be to add a white box behind it (see attached)

Is there a way to add custom code to implement this?

Extra bonus:

  • make arrows bolder
  • move arrows closer to edge

 

current-black.jpg

current-white.jpg

ideal.jpg

Link to comment

You can use this code to Website > Website Tools > Custom CSS. If it doesn't work, you can share link to a product, we can check easier

/* Product arrows */
.ProductItem-gallery-carousel-controls .product-item-gallery-carousel-control:after {
    border-width: 3px 3px 0 0 !important;
    border-color: white !important;
    width: 2vw;
    height: 2vw;
}

 

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

The code above just thickened the arrows and made them white. So now you can't see it on images with light backgrounds.

Is there a way to add a solid box behind it? That way you can see it not matter what the background is behind it.

Link to comment

image.thumb.png.213c1d801e8e58f0a36703856866d2a1.png
Tried updating the background-color but it's not a rectangular shape behind the arrow. It looks like the arrows are made from a rotated square shape.

Any suggestions Tuanphan?

Link to comment
  • Solution

Use this new CSS code

/* Product arrows background */
button.product-item-gallery-carousel-control {
    background-color: white !important;
    justify-content: center !important;
}
.ProductItem-gallery-carousel-controls .product-item-gallery-carousel-control.ProductItem-gallery-next:after {
    margin-left: 0 !important;
}
.ProductItem-gallery-carousel-controls .product-item-gallery-carousel-control.ProductItem-gallery-prev:after {
    margin-right: 0 !important;
}

image.thumb.png.76c08ac7a69ff5bc7c21dcd3fae235b4.png

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.