Best methods to style checkboxes and radio buttons
Hello everyone,
I'm trying to determine what the best way to style checkboxes and radio buttons with embed forms. I know there are tons of cutting-edge CSS methods, but I'm looking for something that is widely supported on desktop and mobile. Our audiences is truckers who primarily use their phones (out in the field), followed by desktop (luckily for the most part, they are using fairly modern browsers).
What I'm doing is using the javascript form embed code from Marketo, then using @Sanford Whiteman's javascript (codepen here) to strip inline styles and destyle mkto classes, so that our CSS will take effect. (I'm also aware of a similar method that just removes all mkto class names and inline-styles. But Sanford's latest codepen seems to be "cooler" and cleaner).
I just can't decide which route to go with these checkboxes and radio buttons. A couple things I considered was to try and handle it all via CSS or using javascript to say, grab the label value, inject that after the input, and hide the label all together.
Here is an example page: http://go.prepass.com/KitchenSinkExample.html and if it helps at all, here is a code pen of the same thing.
In this example, the form on the left is my embedded Marketo form. On the right, is the form I received from our third-party design team. I am trying to match the first form's checkboxes/radio buttons to match the second form (where the input is on the left with the label on the right, and the spacing is nice haha).
Any recommendations on methods that you have found worked well? I went from a team of many to a team of just me and am struggling to make decisions on which methods I should be using.