Опубликовано Оставить комментарий

CF7 responsive

    Напишите мне
    ФИО*
    Email*
    Телефон
    Сообщение

    Форма в CF7
    <fieldset class="fieldset">
    <legend class="legend">Напишите мне</legend>
    
    <div id="responsive-form" class="clearfix">
    
    <div class="form-row">
    <div class="column-full">ФИО [text* your-name akismet:author]</div>
    </div>
    
    <div class="form-row">
    <div class="column-half">Email [email* your-email akismet:author_email]</div>
    <div class="column-half">Телефон [text your-phone]</div>
    </div>
    
    <div class="form-row">
    <div class="column-full">Сообщение  [textarea your-message]</div>
    </div>
    
    <div class="form-row">
    <div class="column-full">[submit "Отправить"]</div>
    </div>
    
    </div><!--end responsive-form-->
    </fieldset>
    CSS
    .fieldset {
    	border: 1px solid #ccc;
    	border-radius: 3px;
    	margin: 0;
    	padding: 0;
    }
    
    .fieldset, .legend {
    	background-color:inherit;
    }
    CSS responsive
    #responsive-form{
    	/*max-width:600px*/ /*-- измените это значение для установки необходимой ширины вашей формы --*/;
    	margin:0 auto;
            width:100%;
    }
    .form-row{
    	width: 100%;
    }
    .column-half, .column-full{
    	float: left;
    	position: relative;
    	padding: 0.65rem;
    	width:100%;
    	-webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box
    }
    .clearfix:after {
    	content: "";
    	display: table;
    	clear: both;
    }
    
    /**---------------- Media query ----------------**/
    @media only screen and (min-width: 48em) {
    	.column-half{
    		width: 50%;
    	}
    }
    
    .wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea {
            /*color: inherit;
    	background: inherit;*/
    	width: 100%;
    	padding: 8px;
    	border: 1px solid #ccc;
    	border-radius: 3px;
    	-webkit-box-sizing: border-box;
    	 -moz-box-sizing: border-box;
    	      box-sizing: border-box
    }
    .wpcf7 input[type="text"]:focus{
    	background: #fff;
    }
    .wpcf7-submit{
    	float: right;
    	background: #CA0002;
    	color: #fff;
    	text-transform: uppercase;
    	border: none;
    	padding: 8px 20px;
    	cursor: pointer;
    }
    .wpcf7-submit:hover{
    	background: #ff0000;
    }
    span.wpcf7-not-valid-tip{
    	text-shadow: none;
    	font-size: 12px;
    	color: #fff;
    	background: #ff0000;
    	padding: 5px;
    }
    div.wpcf7-validation-errors {
    	text-shadow: none;
    	border: transparent;
    	background: #f9cd00;
    	padding: 5px;
    	color: #9C6533;
    	text-align: center;
    	margin: 0;
    	font-size: 12px;
    }
    div.wpcf7-mail-sent-ok{
    	text-align: center;
    	text-shadow: none;
    	padding: 5px;
    	font-size: 12px;
    	background: #59a80f;
    	border-color: #59a80f;
    	color: #fff;
    	margin: 0;
    }
    Добавить комментарий

    Ваш адрес email не будет опубликован. Обязательные поля помечены *