Tell us what’s happening:
Cant get past 15. 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">
<link rel="stylesheet" href="styles.css">
<title>Job Application Form</title>
</head>
<body>
<h1>Job Apllication</h1>
<div class="container">
<form>
<label for="name" id="name">Name:<br>
<input type="text" id="name" name="name"></label><br>
<label for="email" id="email">Email:<br>
<input type="email" id="email"></label><br>
<label for="position">Position:</label>
<br>
<select id="position">
<option>Programmer</option>
<option>Bartender</option>
<option>Electrician</option>
</select>
<br>
<fieldset class="radio-group">
<legend>Availability:</legend>
<br>
<input type="radio" name="availability" value="full-time">
<label for="full-time">Full-Time</label>
<br>
<input type="radio" name="availability" value="part-time">
<label for="part-time">Part-Time</label>
<br>
</fieldset>
<p>Why do you want this job?</p>
<textarea id="message"></textarea>
<br>
<button type="submit">Submit</button>
</form>
</div>
</body>
</html>
/* file: styles.css */
input:focus, textarea:focus {
border-color: blue;
}
input:invalid, select:invalid, textarea:invalid {
border-color: red;
}
input:valid, select:valid, textarea:valid {
border-color: green;
}
button:hover {
background-color: gray;
}
.radio-group input[type="radio"]:checked {
border-color: purple;
background-color: gray;
box-shadow: 0 0 10px gray;
}
.radio-group input[type="radio"]:checked + label {
color: purple;}
input:nth-child(1) {
border-radius: 20px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Challenge Information:
Build a Job Application Form - Build a Job Application Form