Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

CSS to change variant display


Cianfrani

Question

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
  • Answers 13
  • Created
  • Last Reply

Top Posters For This Question

13 answers to this question

Recommended Posts

  • 1

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.

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
  • 1
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.

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
  • 0
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.

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
  • 0
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
  • 0

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
  • 0
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
  • 0
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.

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...