Поля формы
Пример вёрстки полей ввода формы при изменении размеров окна просмотра
by Andrey Dobrovoi
HTML
<div class="content">
<form>
<input name="name" placeholder="Укажите ваше имя!" class="textbox" required />
<input name="emailaddress" placeholder="Укажите ваш Email!" class="textbox" type="email" required />
<textarea rows="4" cols="50" name="subject" placeholder="Введите ваше сообщение:" class="message" required></textarea>
<input name="submit" class="button" type="submit" value="Отправить" />
</form>
</div>
CSS
.content{
margin: 0 auto;
max-width: 700px;
}
form {
margin: 0 auto;
box-sizing:border-box;
width: 100%;
}
/* Стили полей ввода */
.textbox{
height:50px;
width:100%;
border-radius:3px;
border:rgba(0,0,0,.3) 1px solid;
box-sizing:border-box;
font-family: 'Open Sans', sans-serif;
font-size:18px;
padding:10px;
margin-bottom:30px;
}
.message:focus,
.textbox:focus{
outline:none;
border:rgba(24,149,215,1) 1px solid;
color:rgba(24,149,215,1);
}
/* Стили текстового поля */
.message{
background: rgba(255, 255, 255, 0.4);
width:100%;
height: 120px;
border:rgba(0,0,0,.3) 1px solid;
box-sizing:border-box;
-moz-border-radius: 3px;
font-size:18px;
font-family: 'Open Sans', sans-serif;
-webkit-border-radius: 3px;
border-radius: 3px;
display:block;
padding:10px;
margin-bottom:30px;
overflow:hidden;
}
/* Базовые стили кнопки */
.button{
height:50px;
width:100%;
border-radius:3px;
border:rgba(0,0,0,.3) 0px solid;
box-sizing:border-box;
padding:10px;
background:#90c843;
color:#FFF;
font-family: 'Open Sans', sans-serif;
font-weight:400;
font-size: 16pt;
transition:background .4s;
cursor:pointer;
}