cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How to use CSS to change Toggle Button Dimensions

HD_10225728
6-Contributor

How to use CSS to change Toggle Button Dimensions

Hi everyone,

How I can change the size dimensions on Toogle Button? 

HD_10225728_0-1658233635091.png

 
I have tried giving the toggle button the custom class slider-checkbox, but that didn't work.
 
.slider-checkbox {
    width: 79px!important;
    height: 52px!important;
}
 

Has anyone found the CSS solution for this?

 

Thank you!

ACCEPTED SOLUTION

Accepted Solutions

Try this:

 

ptcs-toggle-button::part(rectangle){
    width: 100px !important;
    height: 50px !important;
}

ptcs-toggle-button::part(oval){
    width: 50px !important;
    height: 40px !important;
}

 

nmilleson_0-1658236812836.png

 

View solution in original post

2 REPLIES 2

Try this:

 

ptcs-toggle-button::part(rectangle){
    width: 100px !important;
    height: 50px !important;
}

ptcs-toggle-button::part(oval){
    width: 50px !important;
    height: 40px !important;
}

 

nmilleson_0-1658236812836.png

 

HD_10225728
6-Contributor
(To:nmilleson)

Thank you so much!! Worked perfectly

Announcements


Top Tags