<form action="#" id="js-form">
<div class="name">
<input type="text" name="name" placeholder="Adam" />
<input type="text" name="surname" placeholder="Smith" />
<input type="mail" name="email" placeholder="adam.smith@mail.com"/>
</div>
<div class="radio">
<label for="radio-choice-1">Choice 1</label>
<input type="radio" name="radio-choice" id="radio-choice-1" value="choice-1" />
<label for="radio-choice-2">Choice 2</label>
<input type="radio" name="radio-choice" id="radio-choice-2" value="choice-2" />
</div>
<div class="dropdown">
<label for="select-choice">Select Dropdown Choice:</label>
<select name="select-choice" id="select-choice">
<option value="Choice 1">Choice 1</option>
<option value="Choice 2">Choice 2</option>
<option value="Choice 3">Choice 3</option>
</select>
</div>
<div class="message">
<label for="textarea">Textarea:</label>
<textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
</div>
<div class="check">
<label for="checkbox">Checkbox:</label>
<input type="checkbox" name="checkbox" id="checkbox" />
</div>
<div class="submit">
<input type="submit" value="Submit" disabled/>
</div>
</form>
// Variables
$radius: 4px;
/*Typography*/
html {font: 16px 'Open sans', sans-serif;}
form label {font-size: .9em;}
/* Base */
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
/* Form */
form {
margin: 2% auto;
padding: 1em;
width: 320px;
color: #aaa;
border: .1em solid #ddd;
border-radius: $radius;
}
.name {width: 100%;}
.name input,
.submit input,
select,
textarea {
width: 47%;
height: 3em;
text-indent: .5em;
border: .1em solid #ddd;
border-radius: $radius;
outline-color: #1abc9c;
}
.name input[name="surname"] {float: right;}
.name input[type="mail"] {
margin-top: 1em;
width: 100%;
}
.radio,
.dropdown,
.message,
.check,
.submit {margin-top: 1em;}
.dropdown select,
.message textarea,
.submit input {width: 100%;}
.dropdown select {color: #aaa;}
.message textarea {height: 8em;}
.radio input,
.check input {position: relative;top: 1px;}
.radio input:before,
.check input:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 1em;
height: 1em;
background: #e9e9e9;
border-radius: $radius;
transition: all .35s ease;
}
.radio input:before {
border-radius: 50%;
}
.radio input:checked:before {
top: -.1em;
left: -.1em;
width: .5em;
height: .5em;
border: .35em solid #e9e9e9;
background: #1abc9c;
}
.check input:checked:before {
content: "\f00c";
font-family: 'fontAwesome';
color: #1abc9c;
}
.check input:before {left:-.1px;}
.submit input {
//display: block;
//margin: auto;
//width: 99.5%;
background: #1abc9c;
color: #fff;
border: 0;
border-bottom: $radius solid darken(#1abc9c, 7%);
font-size: 1em;
font-weight: bold;
&:focus,
&:hover {
background: #16a085;
border-bottom-color: darken(#16a085, 7%);
}
&:active {
background: #1bc2a2;
border-bottom-color: darken(#1bc2a2, 7%);
}
}
xxxxxxxxxx