Jump to content

Product variants style

Recommended Posts

  • Replies 16
  • Views 2.2k
  • Created
  • Last Reply

Top Posters In This Topic

On 11/11/2021 at 7:40 AM, Lily278 said:

Hi,

I would like to change the style of the products variants selection from this:1298067958_ScreenShot2021-11-10at7_13_34PM.png.39fa433f1554b7c51dd6a294bb35d6ea.png

to this:

459247100_ScreenShot2021-11-10at7_14_13PM.png.cf866859fee7117e59fde1ad285fd70c.png

What custom CSS could I use?

Thanks in advance

Can you share link to a variant product? We can help easier

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
On 11/14/2021 at 3:08 AM, Lily278 said:

Add to Design > Custom CSS

.product-details .variant-option select {
    border: none !important;
    border-bottom: 1px solid black !important;
}
.product-details .variant-select-wrapper[data-text] {
    padding-left: 0 !important;
    padding-bottom: 5px !important;
}
.ProductItem .ProductItem-details .variant-select-wrapper:after {
    display: none;
}

 

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
20 hours ago, tuanphan said:

Add to Design > Custom CSS

.product-details .variant-option select {
    border: none !important;
    border-bottom: 1px solid black !important;
}
.product-details .variant-select-wrapper[data-text] {
    padding-left: 0 !important;
    padding-bottom: 5px !important;
}
.ProductItem .ProductItem-details .variant-select-wrapper:after {
    display: none;
}

 

Thank you so much!! The result is very close to what I wanted. 

Do you know how to ensure that the two products variants selections are side by side and not one below the other?
I would also like the text to be capitalized, is that possible?
Many thanks in advance

Link to comment
On 11/16/2021 at 6:47 AM, Lily278 said:

Thank you so much!! The result is very close to what I wanted. 

Do you know how to ensure that the two products variants selections are side by side and not one below the other?
I would also like the text to be capitalized, is that possible?
Many thanks in advance

Capitalized or uppercase??

Add to Design > Custom CSS

@media screen and (min-width:768px) {
.ProductItem-details .product-variants {
    display: flex;
    justify-content: space-between;
    width: 90%;
}
.variant-option {
    margin-right: 20px;
}
}

 

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
12 hours ago, tuanphan said:

Capitalized or uppercase??

Add to Design > Custom CSS

@media screen and (min-width:768px) {
.ProductItem-details .product-variants {
    display: flex;
    justify-content: space-between;
    width: 90%;
}
.variant-option {
    margin-right: 20px;
}
}

 

Thank you so much! It's perfect on desktop. Do you know how to have the two products variants selections side by side on mobile too?

Yes uppercase letters  🙂

Link to comment
On 11/18/2021 at 10:55 PM, Lily278 said:

Thank you so much! It's perfect on desktop. Do you know how to have the two products variants selections side by side on mobile too?

Yes uppercase letters  🙂

change 768px to 1px

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
On 11/25/2021 at 5:29 AM, Lily278 said:

Thank you so much! Do you know how to change to uppercase letters ?

try this

@media screen and (min-width:768px) {
.ProductItem-details .product-variants {
    display: flex;
    justify-content: space-between;
    width: 90%;
}
.variant-option {
    margin-right: 20px;
}
.ProductItem-details .product-variants * {
	text-transform: uppercase !important;
}
}

 

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
  • 1 year later...
On 9/15/2023 at 4:49 PM, Ellam said:

Hi Tuan, 

 

I have used your code to customise my variant dropdowns to look like this: image.thumb.png.ec65fb7601b0ca8bd795c3e0218ec58a.png

Is there any way to add a little downwards pointing arrow to show that it's a drop down?

Can you share link to this product? We can check easier

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
On 9/19/2023 at 9:11 PM, Ellam said:

Hi, I figured out how to install the drop down, but I was wondering if it's possible to include a little arrow to indicate that there are options like this:

image.png.82ba9be5364e77c448fc638fc59a50a2.png

Add this to Custom CSS

.product-details .variant-select-wrapper:after {
    display: inline-block !important;
}

image.png.e80115be5c8c82762b9d9f35b52fe669.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.