Are you modifying the code from copepen so that the selectors match the ones in your theme? That css is using very specific class names.
-
This reply was modified 9 years ago by
Jack.
-
This reply was modified 9 years ago by
Jack.
Sorry I am not. I’m not a coder. Can you tell me how I do that please Jack?
Without seeing the page that you’re trying to use that on there’s no way possible for anyone here to say what the right or wrong way is. The code that you’ve posted is fine and will work – but unless the CSS selectors match the HTML structure of your site, it won’t do anything.
Sorry.
Here’s the page on my site with the checkboxes I want to change
http://www.ausdigitalmedia.com/digital-signage-catalogue/
On your site, this is the rule that specifies the CSS for those checkboxes:
.with_frm_style .frm_radio input[type="radio"], .with_frm_style .frm_checkbox input[type="checkbox"] {
display: inline-block;
margin-right: 5px;
width: auto;
border: none;
vertical-align: baseline;
}
That’s part of your Formidable Pro plugin, so you can copy that selector to your themes stylesheet and add the CSS styles that you mentioned above.
.with_frm_style .frm_checkbox input[type="checkbox"] {
width: 50px;
height: 25px;
}
.with_frm_style .frm_checkbox input[type="checkbox"]:checked {
background-color: #00e359;
border: 1px solid rgba(0, 162, 63,1);
box-shadow: inset 0 0 0 10px rgba(0,227,89,1);
}
Now, to note that from the CodePen snippet before, that’s for IOS, so you most likely won’t see any changes on a normal desktop. Most browsers have builtin defaults for field inputs like that, and don’t apply it when rules are specified like that.
Thanks for the reply.
I tried that code with no success. both on my iPhone and the desktop computer.
Then I tried this code
.with_frm_style .frm_checkbox input[type="checkbox"]:checked {
background-color: #00e359;
border: 1px solid rgba(0, 162, 63,1);
box-shadow: inset 0 0 0 10px rgba(0,227,89,1);
width: 50px;
height: 25px;
}
Still no success:(
-
This reply was modified 9 years ago by
willpower1.