Select multiple inputs

Asked

Viewed 217 times

3

I have the following doubts whether it is possible to improve this selection:

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

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

  • Only then would it not work ? #form-login input{}

  • without putting the type....

  • I would like to select by type or change up to Submit

  • ah yes, but that you’re using in the same css or it’s in the function with jquery?

  • In the same css thank you

1 answer

4


You can use not by deleting 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 don’t need them. I think it’s best suited in your case, instead of putting everyone you need, just take away what you don’t want. I hope I’ve helped!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.