1

I have problems selecting the third input tag, below is the code, check it out for me, thanks

<div class="form-login">
    <form>
        <label>Email address</label><br>
        <input type="text" name="account" placeholder="Entet your email"><br>
        <label>Password</label><br>
        <input type="password" name="password" placeholder="Enter your password"><br>
        <input type="radio" name="remember"><label>Remember me</label><br>
        <button type="button" >
            Login now
        </button>
    </form>
</div>
.form-login form input:nth-child(3){}
khanam
  • 89
  • 5

2 Answers2

2

input:nth-child(3) selects the third child of input which doesn't exist. You need to use nth-of-type.

.form-login form input:nth-of-type(3){}

JLai
  • 340
  • 1
  • 8
0

This code for picking up your label;

.form-login form label:nth-of-type(3){}

That one is for your checkbox;

.form-login form input:nth-of-type(3){}
And Aydın
  • 84
  • 4