Build a Job Application Form - Build a Job Application Form

Tell us what’s happening:

I am also having trouble with 14 and 15. Can someone please tell me what is wrong?

  1. You should use the :checked pseudo-class on .radio-group input[type=“radio”] to add a border color, background color and a box shadow when the radio button is selected.
  2. You should use the :checked pseudo-class on radio buttons to change the text color of the associated label when the option is selected.

Your code so far

<!-- file: index.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>
<h1>Job Application Form</h1>

<div class="container">
    <form>
        <label for="name">Full Name:</label><br>
        <input id="name" type="text" placeholder="Enter your name" required></input>
        <br>
        <label for="email">Email:</label><br>
        <input id="email" type="email" placeholder="Enter your email" required></input>
        <br>

        <label for="position">Position</label><br>
        <select id="position" required>Position
            <option value="" disabled selected>Select a position</option>
            <option value="Front Desk">Front Desk</option>
            <option value="Cook">Cook</option>
            <option value="Supervisor">Supervisor</option>
            <option value="Manager">Manager</option>
        </select>

        <fieldset class="radio-group">
            <legend>Availability</legend>
            <input id="full-time" type="radio" name="availability" value="full-time" checked>
            <label for="full-time">Full-time</label>
            <input id="part-time" type="radio" name="availability" value="part-time">
            <label for="part-time">Part-time</label>
            <input id="contract" type="radio" name="availability" value="contract">
            <label for="contract">Contract</label>
        </fieldset>
        
        <label for="message">Why do you want this job?</label>
        <textarea id="message" name="message" placeholder="Write your motivation here" required></textarea>
    
        <button type="submit">Submit</button>
    </form>
</div>
</body>
</html>
/* file: styles.css */
html {
  font-family: Arial;
}

h1 {
  text-align: center;
  font-weight: bold;
  }

.container {
  border-radius: 8px;
  }

form {
  flex-direction: column;
  display: flex;
}

label, legend {
  font-weight: bold;
}

input, select {
  height: 25px;
  margin: 5px;
}

input:focus, textarea:focus {
  border-color: black;
}

input:valid, select:valid, textarea:valid {
  border-color: green;
}

input:invalid,select:invalid, textarea:invalid {
  border-color: red;
}

input[type="radio"]:checked + label {
  color: black;
  }

input:first-of-type {
  color: black;
}

.radio-group label{
  margin: 20px;
}

.radio-group input[type="radio"]:checked {
  border-color: brown;
  background-color:brown;
  box-shadow: grey;
}

button:hover {
  background-color: black;
}




Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36

Challenge Information:

Build a Job Application Form - Build a Job Application Form

Please talk about how you’re stuck figuring out why those two tests are failing.

are you sure you are adding that correctly?

where are you selecting the labels?

That’s it! Thank you for your help!

1 Like