input password in css does not work

Asked

Viewed 117 times

0

I use the same CSS code for both the input "text" and the password, but for one it works and for the other it doesn’t:(see photo)

Code in CSS

#contact input[type="text"],
#contact input[type="email"],
#contact input[type="tel"],
#contact input[type="password"],

HTML code:

<fieldset>
  <input placeholder="Address" type="text" tabindex="1" required autofocus>
</fieldset>
<fieldset>
  <input placeholder="password" type="password" tabindex="1" required autofocus>
</fieldset>
<fieldset>
  <input placeholder="Confirm password" type="password" tabindex="1" required autofocus>
</fieldset>

Resultado

1 answer

2

As long as the inputs are inside a container with id="contact"they will receive the style defined in CSS

See the example below:

#contact input[type="text"],
#contact input[type="email"],
#contact input[type="tel"],
#contact input[type="password"]
{
  width:100%;
  background: #f3ed86;
}
<div id="contact">
  <fieldset>
    <input placeholder="Address" type="text" tabindex="1" required autofocus>
  </fieldset>
  <fieldset>
    <input placeholder="password" type="password" tabindex="1" required autofocus>
  </fieldset>
  <fieldset>
    <input placeholder="Confirm password" type="password" tabindex="1" required autofocus>
  </fieldset>
</div>

Browser other questions tagged

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