Tell us what’s happening:
i cant alignt all my inputs, can someone show me how to properly do it?
thanks!!
Your code so far
<!DOCTYPE html>
<html>
<head>
<title>Form</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1 id="title"> Survey Form</h1>
<div class="container">
<p id="descritpion"> Lets improve our program!</p>
<form id="survey-form">
<div class="leftright">
<div class="left">
<label id="name-label" for="name">*Name: </label>
</div>
<div id="right" class="right">
<input type="text" name="name" id="name" class="input-field" placeholder="Enter your Full Name" required>
</div>
</div>
<div class="leftright">
<div class="left">
<label id="email-label" for="Email">*Email: </label>
</div>
<div id="right" class="right">
<input type="Email" name="Email" id="email" class="input-field" placeholder="Enter your Email" required>
</div>
</div>
<div class="leftright">
<div class="left">
<label id="number-label" for="Age">*Age:</label>
</div>
<div id="right" class="right">
<input type="number" name="Age" id="age" class="input-field" min="1" max="120" required>
</div>
</div>
<div class="leftright">
<div class="left">
<label id="dropdown" for="dropdown">Whats your status:</label>
</div>
<div id="right" class="right">
<select id="dropdown" name="dropdown" class="dropdown">
<option value="Married">Married</option>
<option value="Single">Single</option>
<option value="divorced">Divorced</option>
<option value="complicated">Complicated</option>
</select>
</div>
<div class="leftright">
<div class="left">
<label id="radio" for="radio">How would you describe this form?</label>
</div>
<div id="right" class="right">
<li>
<input type="radio" name="radio" class="radio">EXCELLENT!
</li>
<li>
<input type="radio" name="radio" class="radio">OK!
</li>
<li>
<input type="radio" name="radio" class="radio">COOL!
</li>
<li>
<input type="radio" name="radio" class="radio">TERRIBLE!
</li>
</ul>
</div>
</div>
<div class="leftright">
<div class="left">
<label id="checkbox" for="checkbox">What would change in this form?</label>
</div>
<div id="right checker" class="right">
<li><input type="checkbox" name="checkbox" value="All"> All of it!</li>
<li><input type="checkbox" name="checkbox" value="HTML"> HTML</li>
<li><input type="checkbox" name="checkbox" value="CSS"> CSS</li>
<li><input type="checkbox" name="checkbox" value="JS"> Javascript</li>
<li><input type="checkbox" name="checkbox" value="nothing"> nothing</li>
</div>
</div>
</form>
</div>
</body>
</html>
CSS:
body {
background-color: orange;
text-align: center;
}
.container{
background-color: rgb(250, 250, 250);
margin: 0 auto;
border: 1px black solid;
border-radius: 4px;
width: 75%;
max-width: 900px;
padding: 10px;
padding-top: 20px;
}
.left{
float: left;
vertical-align: top;
text-align: right;
}
.right {
display: inline-block;
text-align: left;
width: 55%;
vertical-align: top;
border: 0 10px;
margin: 0 10px;
padding: 0 10px;
list-style: none;
}
.input-field{
width: 48%;
}
.checker {
width: 20px;
margin: 10px 10px;
border: 10px 10px;
padding: 10px 10px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
You can also see it at my codepen: