Skip to main content
Level 2
May 20, 2022 5:56 PM UTC
Solved

Change Size of Checkbox on Form

Hello! I am trying to change the size of the checkbox related to field Unsubscribe from all emails. The landing page can be viewed here - https://go.vituity.com/Preference-Center.html 

Ive entered the custom CSS in the form editor: 

 

.mktoForm .mktoCheckboxList { width: 100px; !important; height: 100px; !important; margin-right: -5px; !important; }

 

This has not increased the size of the checkbox. Any help would be greatly appreciated!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
May 20, 2022 6:11 PM UTC

Well, first of all, your CSS doesn’t target the checkbox itself, it’s targeting one of its parent elements. So it wouldn’t be expected to change the input size.

 

But even fixing that wouldn’t help because the theme you chose doesn’t use the native input elements. Rather — in a move I personally hate because it breaks the Principle of Least Astonishment — it replaces the real inputs with fake checkboxes built from pseudo elements. As such you would restyle the pseudos:

.mktoForm input[type="checkbox"] + label::before, .mktoForm input[type="radio"] + label::before { width: 1em; height: 1em; font-size: 23px; }

 

2 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
May 20, 2022 6:11 PM UTC

Well, first of all, your CSS doesn’t target the checkbox itself, it’s targeting one of its parent elements. So it wouldn’t be expected to change the input size.

 

But even fixing that wouldn’t help because the theme you chose doesn’t use the native input elements. Rather — in a move I personally hate because it breaks the Principle of Least Astonishment — it replaces the real inputs with fake checkboxes built from pseudo elements. As such you would restyle the pseudos:

.mktoForm input[type="checkbox"] + label::before, .mktoForm input[type="radio"] + label::before { width: 1em; height: 1em; font-size: 23px; }

 

Translate
MattNuAuthor
Level 2
May 23, 2022 4:28 PM UTC

That worked, thank you so much for your help!

Translate