input password in css does not work

0

I use the same CSS code for both the "text" input and the password, however for one it works and for the other it does not: (see photo)

CSS Code

#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>

    
asked by anonymous 19.11.2018 / 19:05

1 answer

2

Since 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>
    
19.11.2018 / 19:13