Tell us what’s happening:
Hello There
Can anyone help me?
I am getting this error although i have tried many different styles but it wont work.
- 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.
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>
<div class="container">
<h1>Job Application Form</h1>
<form>
<label for="name">Full Name: </label>
<input type="text" id="name" name="name" placeholder="Enter your name" required />
<label for="email">Email: </label>
<input type="email" id="email" name="email" placeholder="Enter your email" required />
<label for="position">Position: </label>
<select id="position" name="position" required>
<option value="" selected>Select a position</option>
<option value="developer">Developer</option>
<option value="designer">Designer</option>
<option value="manager">Manager</option>
</select>
<fieldset class="radio-group">
<legend>Availability:</legend>
<input type="radio" id="full" value="full" name="availability" checked />
<label for="full">Full-Time</label>
<input type="radio" id="part" value="part" name="availability" />
<label for="part">Part-Time</label>
</fieldset>
<label for="message">Why do you want this job?</label>
<textarea id="message" placeholder="write your motivation" name="message" rows="3" cols="30" required></textarea>
<button type="submit">Submit Application</button>
</form>
</div>
</body>
</html>
/* file: styles.css */
* {
box-sizing: border-box;
borde: 1px solid
}
body {
font-family: "Open Sans", sans-serif;
font-size: 1rem;
padding: 20px;
margin: 0;
}
.container {
width: calc(5 * (100% / 7));
box-shadow: 0px 0px 5px 0px gray;
border-radius: 10px;
margin: 0 auto;
padding: 30px 30px;
}
h1 {
text-align: center;
margin-bottom: 30px;
}
input:not([type="radio"]), textarea, button, select {
display: block;
width: 100%;
padding: 10px;
border-radius: 5px;
}
input:invalid, select:invalid, textarea:invalid {
border: 1px solid red
}
input:valid, select:valid, textarea:valid {
border: 1px solid green
}
input:focus, textarea:focus {
outline: none;
border: 1px solid yellow;
}
input:first-of-type {
font-size: 0.8em;
}
label, button {
display: block;
margin: 25px 0 10px 0;
}
fieldset {
padding: 20px;
margin: 25px 0;
}
fieldset label {
margin: 0 30px 0 0;
display: inline;
transition: all 0.3s ease;
}
.radio-group input[type="radio"] {
appearance: none;
width: 12px;
height: 12px;
border-radius: 50%;
outline: 1px solid gray;
outline-offset: 3px;
transition: all 0.3s ease;
margin-right: 10px;
}
.radio-group input[type="radio"]:checked {
transform: scale(1);
background-color: lightgreen;
border: none;
box-shadow: 0 0 20px 5px lightgreen;
}
.radio-group input[type="radio"]:checked + label {
color: green;
}
button {
font-size: 1.1em;
color: white;
background-color: green;
border: 0;
}
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/149.0.0.0 Safari/537.36
Challenge Information:
Build a Job Application Form - Build a Job Application Form