Build a Job Application Form - Build a Job Application Form

Tell us what’s happening:

I couldn’t get the focus state to work, until I realized: it will always take the latest rule, so the order in the instructions is off. Which may be ok, as this gives us a moment to tinker… but in the example, the proper order isn’t honoured either:
Because the validation rules come after :focus (or share specificity without proper sequencing), clicking into a field immediately triggers the validation border instead of showing the yellow focus ring inside the example, maybe worth an update?

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">
    <link rel="stylesheet" href="styles.css">
    <title>Job Application Form</title>
</head>
<body>
    <div class="container">
        <form>
            <label for="name">Full Name</label>
            <Input type="text" id="name">
            <label for="email">Email Address</label>
            <input type="email" id="email">

            <label for="position">Job Position</label>
            <select id="position">
                <option value="">Select a position</option> 
                <option value="chair-warmer">Chair Warmer</option>
                <option value="sessel-pupser">Sessel Pupser</option>
            </select>

            <fieldset class="radio-group">
                <legend>Availability</legend>
                    <input type="radio" name="availability" value="full-time"
                    id="full-time"> 
                    <label for="full-time">Full-Time</label>
                    <input type="radio" name="availability" value="part-time"
                    id="part-time">
                <label for="part-time">Part-Time</label>
            </fieldset>
            <label for="message">Tell us:</label>
                <textarea id="message" rows="4" placeholder="What makes you an asset to this chair?">    
                </textarea>
            <button type="submit">Submit</button>
        </form>
    </div>
</body>
</html>
/* file: styles.css */
body {
  background-color: rgb(216, 247, 216);
  align-content: flex;
}
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input:invalid, select:invalid, textarea:invalid {
  border: 2px solid red;
}
input:valid, select:valid, textarea:valid {
  border: 2px solid green;
}
input:focus, textarea:focus {
  outline: none;
  border: 2px solid yellow;
}
button {
  width: 60px;
  align-self: center;
}
button:hover {
background-color: darkgrey;
color: whitesmoke;
}
.radio-group input[type="radio"]:checked {
  appearance: none;
  border-color: darkgreen;
  background-color: lightgreen;
  box-shadow: 0 0 3px darkgreen;
  width: 12px;
  height: 12px;
  border-radius: 50%;

}
.radio-group input[type="radio"]:checked + label {
  color:darkgreen;
}
input:first-of-type {
  color: darkgreen;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:156.0) Gecko/20100101 Firefox/156.0

Challenge Information:

Build a Job Application Form - Build a Job Application Form

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-job-application-form/66faac4139dbbd5dd632c860.md at main · freeCodeCamp/freeCodeCamp · GitHub

Hi @programlegion,

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

Happy coding

We have blurred this solution (with [spoiler][/spoiler] tags) so that users who have not completed this challenge can read the discussion in this thread without giving away the solution.

Thanks for those steps, but it’s definitely not a browser or cache issue on my end—it’s a CSS cascade conflict in the reference example itself.

If you open up the reference example project and click into any input field, you’ll notice right away that there is no yellow focus ring shown. Because the validation rules (:invalid/:valid) are written after the :focus rule—following the exact order listed in the assignment instructions—the validation styles completely override the focus state. If you follow the instructions in that exact sequence, it’s actually impossible to ever see the yellow focus outline, as it always gets overridden by either red or green!

Whoever built the reference example likely followed the prompt’s order step-by-step without realizing the cascade order would break the :focus state.

Where is the best place or channel to submit an issue for curriculum/reference project bugs like this?

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

created an issue here