How to select element inside a class using CSS only

Hi there

I am trying to larger input type checkbox inside a class.I am not creating a new class for this instead I am trying to select checkbox type element using CSS only

but its not working

Do you mean you want the checkbox itself to be larger?


Didn’t manage to spend too long on the code, but I couldn’t spot anything in the CSS rules that were targeting the <input> elements. Which of the rules are you expecting to do that?


You could try taking the approach shown in this thread - How to increase the checkbox size?

I think this shows using JQuery I am looking for simple CSS solution

I already have hack how to do that usng Javascript

Post #2 in that thread shows a CSS only solution. jQuery only appears a couple of months later, as an alternative approach.

You can’t really change a checkbox or radio box as those items are controlled by the browser and vary in all browsers (some browsers allow a little color or font-size change and others do not).

What you can do is to style the label to look like a checkbox and associate it with the checkbox; then hide the original checkbox from view. There are loads of articles around on how to do this.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.