dimaslanjaka

Resposive Contact Form

Mar 5th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.16 KB | None | 0 0
  1. <style>
  2. @import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
  3.  
  4. html{    background:url(http://thekitemap.com/images/feedback-img.jpg) no-repeat;
  5.   background-size: cover;
  6.   height:100%;
  7. }
  8.  
  9. #feedback-page{
  10.     text-align:center;
  11. }
  12.  
  13. #form-main{
  14.     width:100%;
  15.     float:left;
  16.     padding-top:0px;
  17. }
  18.  
  19. #form-div {
  20.     background-color:rgba(72,72,72,0.4);
  21.     padding-left:35px;
  22.     padding-right:35px;
  23.     padding-top:35px;
  24.     padding-bottom:50px;
  25.     width: 450px;
  26.     float: left;
  27.     left: 50%;
  28.     position: absolute;
  29.   margin-top:30px;
  30.     margin-left: -260px;
  31.   -moz-border-radius: 7px;
  32.   -webkit-border-radius: 7px;
  33. }
  34.  
  35. .feedback-input {
  36.     color:#3c3c3c;
  37.     font-family: Helvetica, Arial, sans-serif;
  38.   font-weight:500;
  39.     font-size: 18px;
  40.     border-radius: 0;
  41.     line-height: 22px;
  42.     background-color: #fbfbfb;
  43.     padding: 13px 13px 13px 54px;
  44.     margin-bottom: 10px;
  45.     width:100%;
  46.     -webkit-box-sizing: border-box;
  47.     -moz-box-sizing: border-box;
  48.     -ms-box-sizing: border-box;
  49.     box-sizing: border-box;
  50.   border: 3px solid rgba(0,0,0,0);
  51. }
  52.  
  53. .feedback-input:focus{
  54.     background: #fff;
  55.     box-shadow: 0;
  56.     border: 3px solid #3498db;
  57.     color: #3498db;
  58.     outline: none;
  59.   padding: 13px 13px 13px 54px;
  60. }
  61.  
  62. .focused{
  63.     color:#30aed6;
  64.     border:#30aed6 solid 3px;
  65. }
  66.  
  67. /* Icons ---------------------------------- */
  68. #name{
  69.     background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
  70.     background-size: 30px 30px;
  71.     background-position: 11px 8px;
  72.     background-repeat: no-repeat;
  73. }
  74.  
  75. #name:focus{
  76.     background-image: url(http://rexkirby.com/kirbyandson/images/name.svg);
  77.     background-size: 30px 30px;
  78.     background-position: 8px 5px;
  79.   background-position: 11px 8px;
  80.     background-repeat: no-repeat;
  81. }
  82.  
  83. #email{
  84.     background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
  85.     background-size: 30px 30px;
  86.     background-position: 11px 8px;
  87.     background-repeat: no-repeat;
  88. }
  89.  
  90. #email:focus{
  91.     background-image: url(http://rexkirby.com/kirbyandson/images/email.svg);
  92.     background-size: 30px 30px;
  93.   background-position: 11px 8px;
  94.     background-repeat: no-repeat;
  95. }
  96.  
  97. #comment{
  98.     background-image: url(http://rexkirby.com/kirbyandson/images/comment.svg);
  99.     background-size: 30px 30px;
  100.     background-position: 11px 8px;
  101.     background-repeat: no-repeat;
  102. }
  103.  
  104. textarea {
  105.     width: 100%;
  106.     height: 150px;
  107.     line-height: 150%;
  108.     resize:vertical;
  109. }
  110.  
  111. input:hover, textarea:hover,
  112. input:focus, textarea:focus {
  113.     background-color:white;
  114. }
  115.  
  116. #button-blue{
  117.     font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  118.     float:left;
  119.     width: 100%;
  120.     border: #fbfbfb solid 4px;
  121.     cursor:pointer;
  122.     background-color: #3498db;
  123.     color:white;
  124.     font-size:24px;
  125.     padding-top:22px;
  126.     padding-bottom:22px;
  127.     -webkit-transition: all 0.3s;
  128.     -moz-transition: all 0.3s;
  129.     transition: all 0.3s;
  130.   margin-top:-4px;
  131.   font-weight:700;
  132. }
  133.  
  134. #button-blue:hover{
  135.     background-color: rgba(0,0,0,0);
  136.     color: #0493bd;
  137. }
  138.    
  139. .submit:hover {
  140.     color: #3498db;
  141. }
  142.    
  143. .ease {
  144.     width: 0px;
  145.     height: 74px;
  146.     background-color: #fbfbfb;
  147.     -webkit-transition: .3s ease;
  148.     -moz-transition: .3s ease;
  149.     -o-transition: .3s ease;
  150.     -ms-transition: .3s ease;
  151.     transition: .3s ease;
  152. }
  153.  
  154. .submit:hover .ease{
  155.   width:100%;
  156.   background-color:white;
  157. }
  158.  
  159. @media only screen and (max-width: 580px) {
  160.     #form-div{
  161.         left: 3%;
  162.         margin-right: 3%;
  163.         width: 88%;
  164.         margin-left: 0;
  165.         padding-left: 3%;
  166.         padding-right: 3%;
  167.     }
  168. }
  169. </style>
  170. <div id="form-main">
  171.   <div id="form-div">
  172.     <form class="form" id="form1">
  173.      
  174.       <p class="name">
  175.         <input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Name" id="name" />
  176.       </p>
  177.      
  178.       <p class="email">
  179.         <input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
  180.       </p>
  181.      
  182.       <p class="text">
  183.         <textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Comment"></textarea>
  184.       </p>
  185.      
  186.      
  187.       <div class="submit">
  188.         <input type="submit" value="SEND" id="button-blue"/>
  189.         <div class="ease"></div>
  190.       </div>
  191.     </form>
  192.   </div>
Add Comment
Please, Sign In to add comment