Assessment wanted for Advanced form styling 1 skill test. Task-2.
Task-2.
by EiNzp
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Advanced styling: Task 2</title>
<link rel="stylesheet" href="styles/style.css">
</head>
<body>
<form>
<fieldset>
<legend>Who is your favorite pony?</legend>
<ul>
<li>
<label for="pinkie">Pinkie Pie</label>
<input type="radio" id="pinkie" name="pony" value="pinkie">
</li>
<li>
<label for="rainbow">Rainbow Dash</label>
<input type="radio" id="rainbow" name="pony" value="rainbow">
</li>
<li>
<label for="twilight">Twilight Sparkle</label>
<input type="radio" id="twilight" name="pony" value="twilight">
</li>
</ul>
</fieldset>
</form>
</body>
</html>
CSS
body {
background-color: #fff;
color: #333;
font: 1em / 1.4 Helvetica Neue, Helvetica, Arial, sans-serif;
padding: 1em;
margin: 0;
}
* {
box-sizing: border-box;
}
button,
input,
select {
font-family: inherit;
font-size: 100%;
padding: 0;
margin: 0;
}
/* my code */
input[type="radio"] {
appearance: none;
position: relative;
width: 18px;
height: 18px;
border-radius: 50%;
border: 1px solid black;
vertical-align: -3px;
background-color: #eee;
margin-left: 5px;
}
input[type="radio"]:hover, input[type="radio"]:focus{
outline: none;
background-color: silver;
box-shadow: 0px 0px 2px 1px black;
}
input[type="radio"]:checked{
border: 1px solid red;
background-color: green;
box-shadow: 0px 0px 2px 1px red;
}
li {
display: flex;
align-items: center;
}