Form layout clean
by PhilQ
HTML
<input type="text" value="jnb jkn" /><br />
<input type="password" /><br />
<input type="checkbox" name="cbs" id="cb1" /><label for="cb1">Optie 1</label><br />
<input type="checkbox" name="cbs" id="cb2" /><label for="cb2">Optie 2</label><br />
<input type="checkbox" name="cbs" id="cb3" /><label for="cb3">Optie 3</label><br />
<input type="radio" name="rbs" id="rb1" /><label for="rb1">Optie 1</label><br />
<input type="radio" name="rbs" id="rb2" /><label for="rb2">Optie 2</label><br />
<input type="radio" name="rbs" id="rb3" /><label for="rb3">Optie 3</label><br />
<select>
<option>optie1</option>
<option>optie2</option>
</select><br />
<textarea>jnb jkn</textarea><br />
<input type="submit" /><br />
CSS
*, *:before, *:after {
box-sizing: border-box;
padding: 0px;
margin: 0px;
}
body{
background-color: #ccc;
}
input[type=text], input[type=password], textarea, input[type=submit], select {
width: 250px;
min-height: 40px;
height: 40px;
padding: 10px 15px 10px;
color: #555;
text-shadow: 0px 1px 0px rgba(0,0,0, 0.2);
font-size: 16px;
font-family: sans-serif;
border-radius: 4px;
border: 1px solid #ccc;
box-shadow: inset 0px 1px 1px 0px rgba(0,0,0, 0.5);
}
input[type="password"] {
font: large Verdana,sans-serif;
letter-spacing: 1px;
}
textarea {
padding-top: 7px;
line-height: 1.5;
min-height: 90px;
}
input[type=checkbox], input[type=radio] {
width: 40px;
height: 40px;
display: inline-block;
vertical-align: top;
opacity: 0;
}
input[type=checkbox] + label, input[type=radio] + label {
display: inline-block;
position: relative;
width: 210px;
min-height: 40px;
height: 40px;
padding: 11px 15px 9px 0px;
vertical-align: top;
color: #555;
text-shadow: 0px 1px 0px rgba(0,0,0, 0.2);
font-size: 14px;
font-family: sans-serif;
}
input[type=checkbox] + label:before, input[type=radio] + label:before {
content: "";
position: absolute;
top: 5px;
left: -35px;
border-radius: 4px;
width: 30px;
height: 30px;
background-color: #fff;
border: 1px solid #ccc;
box-shadow: inset 0px 1px 1px 0px rgba(0,0,0, 0.5);
vertical-align: top;
}
input[type=radio] + label:before {
border-radius: 50%;
}
input[type=checkbox]:checked + label:after, input[type=radio]:checked + label:after {
content: "";
position: absolute;
top: 13px;
left: -27px;
border-radius: 4px;
width: 15px;
height: 15px;
box-shadow: inset 0px -1px 1px 0px rgba(0,0,0, 0.3);
vertical-align: top;
background-color: #555;
}
input[type=radio]:checked + label:after {
border-radius: 50%;
}
input[type=submit] {
...