Build a Job Application Form

I can’t figure out #17 and #18. I’m still very confused about using and naming selectors, especially with the pseudo-classes.

Here is my HTML:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Job Application Form</title>

    <link rel="stylesheet" href="styles.css">

</head>

<body>

    <div class="container">

        <h1>Job Application Form</h1>



        <form>

            <!-- Name -->

            <label for="name">Full Name:</label>

            <input type="text" id="name" required><br>

    

            <!-- Email -->

            <label for="email">Email:</label>

            <input type="email" id="email" required><br>



            <!-- Position -->

            <label for="position">Desired Position:</label>

            <select id="position">

                <option value="dev">Junior Developer</option>

                <option value="designer">UI/UX Designer</option>

                <option value="pm"> IT Project Manager</option>

            </select>

            

            <!-- Availability -->

            <fieldset class="radio-group">

                <legend>Availability </legend>



                         <!-- Full time -->

                <input type="radio" id="full-time" name="availability">

                <label for="full-time">Full-Time</label>

                

                        <!-- Part Time -->

                <input type="radio" id="part-time" name="availability">

                <label for="part-time">Part-Time</label>

            </fieldset>



            <!-- Motivation -->

            <label>Why do you want this job?</label><br>

            <textarea id="message" required>Write your motivation</textarea><br>



            <!-- Submit button -->

            <button type="submit">Submit</button>

        </form>

    </div>

</body>

</html>

And css:

body{

  font-family: arial, sans-serif;

  padding: 20px;

}



.container{

  max-width: 600px;

  margin: 0 auto;

  padding: 20px;

}



input:focus, textarea:focus {

  border-color: blue;

}



/\* invalid psuedo-class \*/

input:invalid, select:invalid, textarea:invalid {

  border-color: red;

}



/\* valid pseudo-class \*/

input:valid, select:valid, textarea:valid {

  border-color: green;

}



button:hover {

    background-color: darkorange;

}



.radio-group input\[type="radio"\]:checked {

    border-color:maroon;background-color: rgb(197, 137, 161);

    box-shadow: 1px green;

}



#full-time:checked {

    color: yellowgreen;

}



#part-time:checked {

    color: yellowgreen;

}



input:first-of-type {

    color: cadetblue;

}

Hi there and welcome to the forum!

Please also give a link to the challenge.

I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').