0

I have a number of checkboxes on a page and want to hide only ones attached to the advanced filter main class, I tried this and it doesnt work.

.advanced-filter:input[type='checkbox'] {
    display:none;
}

Any ideas? Thanks

3 Answers 3

1

You want to select an HTML element based on it's class and tag name(and attribute).
The correct syntax to do so is:

tagname.classname {
  properties;
}

So, you'd want to do something like:

input[type='checkbox'].advanced-filter {
  display:none;
}
Sign up to request clarification or add additional context in comments.

Comments

1

What is the purpose of :input? I'm not aware of that as a pseudo-class.

what I think you want is:

input.advanced-filter[type='checkbox']

Comments

0

Neither solutions worked, but I solved in the end by giving the checkbox an ID and hiding that ID.

Thanks for the help though, its always appreciated on this forum!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.