Select multiple inputs

3

I have the following question if you can improve this selection:

#form-login > input[type="email"], #form-login > input[type="password"] {}

Because if I have multiple inputs it will get very large ..

    
asked by anonymous 04.12.2016 / 02:49

1 answer

4

You can use not, excluding the element you do not want to apply the same rule in your case would look like this:

   #form-login input:not([type="submit"]){ background-color:#000;}

The not selector is very useful for deleting elements from selectors when you do not need them. I think it's the most appropriate in your case, instead of putting all you need, just take out what you do not want. I hope I have helped !!

    
04.12.2016 / 03:00