0

I was trying to validate my css and this bit of code gave me an error in the css validator, was just wondering what i might be doing wrong here, the error is:

select Parse Error [inp_submit] select Parse Error select) { padding-top: 3px; } 

CSS Code below:

content form :not(#inp_submit, select) { padding-top: 3px; } 

If you have any suggestions as to what might be going wrong please let me know, thanks.

1

1 Answer 1

1

In CSS, unlike in jQuery, :not() doesn't accept a comma-separated list of selectors. The parse error is probably a result of the validator trying to split the entire selector by that comma, which obviously won't work.

For your CSS to work you need to chain two :not() selectors instead:

content form :not(#inp_submit):not(select) { padding-top: 3px; } 

(Also, just as a sanity check, are you sure your content selector is correct? It's a valid type selector, but there is no content element in HTML.)

Sign up to request clarification or add additional context in comments.

2 Comments

Yeah haha, i worked it out from the link above but since you have answered my question correctly, i will accept this answer!
@c.had1990: Always better to have an answered question than one that's left hanging :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.