Build a Job Application Form-step 19

Tell us what’s happening:19:You should use the :checked pseudo-class on radio buttons to change the text color of the associated label when the option is selected.

I Checked everything i didn’t find the problem..

Your code so far

  <!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>
    <main>
      <div class="container">
        <h1>Job Application Form</h1>
        <form>

          <label for="name">Full Name:</label>
          <input
            id="name"
            name="name"
            type="text"
            placeholder="E.g., John Doe"
            required
          />

          <label for="email">Email:</label>
          <input
            id="email"
            name="email"
            type="email"
            placeholder="johndoe@email.com"
            required
          />

          <label for="position">Position:</label>
          <select
            id="position"
            name="position"
            required
          >
            <option value="">Select a Position</option>
            <option value="ui-ux-designer">UI/UX Designer</option>
            <option value="front-end">Front-end Developer</option>
            <option value="back-end">Back-end Developer</option>
            <option value="manager">Manager</option>
            <option value="cyber-security">Cyber Security</option>
            <option value="seo-optimizer">SEO Optimizer</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"
            rows="5"
            cols="40"
            placeholder="Write your motivation here..."
            required
          ></textarea>

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

        </form>
      </div>
    </main>
  </body>
  </html>
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #d9e4f5);
    margin: 0;
    padding: 40px 20px;
    color: #2b2b2b;
}

.container {
    display: block;
    background-color: #ffffff;
    width: 90%;
    max-width: 600px;
    border-radius: 14px;
    margin: 0 auto;
    padding: 40px 45px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

h1 {
    text-align: center;
    color: #1f2937;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    margin-top: 14px;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #f9fafb;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus,
textarea:focus {
    border-color: #22c55e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

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

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

input:first-of-type {
    border-radius: 16px;
    background-color: #eef2ff;
}

.radio-group {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 16px;
}

.radio-group legend {
    font-weight: 700;
    color: #1f2937;
    padding: 0 8px;
}

.radio-group label {
    display: inline-block;
    margin: 6px 16px 6px 6px;
    font-weight: 500;
    color: #4b5563;
    transition: color 0.2s ease;
}

.radio-group input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    box-sizing: border-box;
    vertical-align: middle;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

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

    border-color: #22c55e;
    background-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.radio-group input[type="radio"]:checked + label {
    color: #16a34a;
    font-weight: 700;
}

button {
    margin-top: 24px;
    padding: 12px 20px;
    background-color: #22c55e;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

button:hover {
    background-color: #16a34a;
}
button:active {
    background-color:#22c55e;

}

Lesson URL (copy - paste from your browser’s address bar)

try removing transition property from your CSS

NAH. IT DOESN’T WORK.

.radio-group label[type=“radio”]:checked {

color: #16a34a;

font-weight: 700;

}DOESN’T IT HAVE TO DO ANYTHING WITH THIS?

CAN YOU UPLOAD THE GIVEN EXAMPLE CODE OF THIS CHAPTER.

that selector is inactive, labels can’t be checked

please keep removing transition property from all your CSS

sir plz upload the Example application form code…
I’m stuck on it for 2 days. and it’s not that big of a problem maybe the chapter bug …its validating something wrong should i contact “Quincy Larson” for this.??just kidding but referring this problem to alumni or someone who passed it will help a lot.

Hello @0121adilrashid,

We don’t provide solutions – it’s against forum rules.

When we take the time to help you, maybe listen?

The transition property causes a delay that borks the tests. Remove all transition properties in your CSS to pass the tests.

did you remove all transition property from your code? I tested your code without it and it passes

Thanks for helping. really appreciate you giving my problem your precious time.
I tried removing transition earlier it didn’t work.(maybe missed one)
BTW i never thought its the problem in the first place. again thanks.

Don’t tell me you did something in the backend .and it worked this time…(maybe I missed 1 before that’s why it didn’t worked.) Thank you.

Just a quick question.Is transition related to :checked at all in real-world CSS, or are they completely unrelated? Just want to know if that was ever a real lead or a dead end. or its some kind of bug in this chapter “code validator thing”.?

no change, you removed all transition properties that were an issue this time


transition can be used to change how an element changes style, like when you style the unchecked and the checked forms differently

transition makes the change take time, and the tests are not able to wait for the change, that’s the issue