Build A Survey Form
Build A Survey Form
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 id="title">Lisa's Survey Form</h1>
<form id="survey-form">
<div>
<label for="name" id="name-label">Name:</label>
<input type="text" id="name" name="name" placeholder="Enter your name"
required>
</div>
<div>
<label for="email" id="email-label">Email:</label>
<input type="email" id="email" name="email" placeholder="Enter your
email address" required>
</div>
<div>
<label for="number" id="number-label">Age:</label>
<input type="number" id="number" name="age" placeholder="Enter your
age" min="1" max="120" required>
</div>
<div>
<label for="dropdown">Gender:</label>
<select id="dropdown" name="gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</div>
<div>
<label>Financial situation:</label>
<input type="radio" id="poor" name="financial-situation" value="Poor"
checked>
<label for="poor">Poor</label>
<div>
<label for="things">Things you want in life:</label>
<input type="checkbox" id="wife" name="things" value="Wife">
<label for="wife">Wife</label>
<div>
<label for="comments">Comments:</label>
<textarea id="comments" name="comments" placeholder="Enter your
comments here..."></textarea>
</div>
** end of undefined **
** start of undefined **
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
font-family: sans-serif;
}
h1 {
margin: 20px auto;
width: fit-content;
}
#description {
margin: 10px auto 20px;
width: fit-content;
}
#survey-form {
padding: 20px;
height: fit-content;
background-color: #888;
width: 85%;
margin: 0 auto 20px;
border: 5px solid orange;
border-radius: 0 20px 20px;
}
label {
font-size: 1.3rem;
margin: 10px auto;
color: white;
}
input,
select,
textarea {
padding: 8px;
font-size: 1.2rem;
width: 60%;
display: inline-block;
border-radius: 5px;
border: none;
outline: none;
}
input[type="checkbox"],
input[type="radio"] {
width: auto;
}
div {
margin: 7px auto;
}
select {
outline: none;
}
input[required] {
box-shadow: 2px 2px 3px 0.1px #080808;
}
div.container {
padding-left: 220px;
display: inline-block;
position: relative;
}
.things {
position: absolute;
top: -5px;
left: 0;
}
textarea {
height: 80px;
border-radius: 0 10px 10px;
}
#rich {
margin-left: 180px;
}
input[type="radio"]:checked + label {
color: rgb(100, 230, 90);
}
input[type="checkbox"] {
margin-right: 10px;
}
button {
padding: 8px 16px;
border-radius: 7px;
color: green;
font-size: 1.1rem;
transition: transform 0.5s;
cursor: pointer;
}
button:hover {
transform: scale(1.04);
}
button:active {
background-color: green;
color: white;
}
** end of undefined **