Jump to content

CSS to change variant display

Recommended Posts

Site URL: https://www.cianfranicoffeeroasters.com/order-coffee/fulton-cycle-hw6sc

New to SquareSpace so I'm a bit frustrated that I can't change the layout of the product block, or change the font of the variant drop down menus. If you look at a sample page (https://www.cianfranicoffeeroasters.com/order-coffee/fulton-cycle-hw6sc) you can see the variants stick out like a sore thumb. 

1) How can I change the font to match the font on the template?
2) How can I change the layout of the variants so they are not displayed one below the other, like they are now, but in two columns? 

Link to comment
  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Add to Home > Design > Custom CSS

/* tested by tuan */
/* question 01 */
.variant-option select, .variant-option select option {
    font-family: freight-sans-pro !important;
}

 

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
2 hours ago, Cianfrani said:

Thanks tuanphan! That worked great! I added the font-size attribute to make it a closer match. 

Anyone have suggestions on question 2?

 

You mean like this?

image.thumb.png.b9a35162952b7f3ea74cabace7bda113.png

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
21 hours ago, Cianfrani said:

Exactly like that!

 

Add to Home > Design > Custom CSS

.product-variants {
    column-count: 2;
}
#productDetails .product-variants .variant-option {
    margin-top: 0;
}

 

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
  • 5 months later...
  • 5 weeks later...
  • 6 months later...
On 3/25/2020 at 10:23 AM, tuanphan said:

Add to Home > Design > Custom CSS


.product-variants {
    column-count: 2;
}
#productDetails .product-variants .variant-option {
    margin-top: 0;
}

 

Hey Tuan,

I'm having the inverse problem. I adjusted the size of my product-variant dropdown menus with the code shown below and now when I go to my site, two dropdown menus end up beside each other on the same line. I tried to set the column count to 1 (and even 0) and it didn't solve the issue. Any tips? I'd like to be able to set the width of the boxes to 250px and have them on separate lines.

Thanks!

Existing code:

.variant-option {
  width: 250px !important;
}
.product-variants {
    column-count: 1;
}

image.png

Link to comment

Played around with it some more and figured it out myself:

 

.product-variants {
width: 250px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important; 
}

Link to comment
  • 5 months later...
On 3/25/2020 at 10:23 AM, tuanphan said:

Add to Home > Design > Custom CSS

.product-variants {
    column-count: 2;
}
#productDetails .product-variants .variant-option {
    margin-top: 0;
}

 

Hi Tuanphan, this is not working for me, can you possibly help? I am using the swatch plugin so maybe this is the issue?

Trying to get the colour and size variants all on one line with add to cart button below or if that is not possible, if I could reduce the spacing between price, variants and add to cart button that would help too.

Here is one product page for an example:https://kokorozenwear.com/loungewear/p/retro-tshirt

Attached is what I would like it to look like ideally:) Thanks so much in advance

Screen Shot 2021-10-06 at 9.36.21 AM copy.jpg

Link to comment
On 10/6/2021 at 9:00 PM, Daniellerose said:

Hi Tuanphan, this is not working for me, can you possibly help? I am using the swatch plugin so maybe this is the issue?

Trying to get the colour and size variants all on one line with add to cart button below or if that is not possible, if I could reduce the spacing between price, variants and add to cart button that would help too.

Here is one product page for an example:https://kokorozenwear.com/loungewear/p/retro-tshirt

Attached is what I would like it to look like ideally:) Thanks so much in advance

Screen Shot 2021-10-06 at 9.36.21 AM copy.jpg

Add to Design > Custom CSS

.variant-option {
    float: left;
}

 

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

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.