Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Simple Complaint Form</title> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous"> <style> html, body { min-height: 100%; } body, div, form, input, select, p { padding: 0; margin: 0; outline: none; font-family: Roboto, Arial, sans-serif; font-size: 14px; color: #666; line-height: 22px; } h1 { margin: 15px 0; font-weight: 400; } h4 { margin-bottom: 4px; } .testbox { display: flex; justify-content: center; align-items: center; height: inherit; padding: 3px; } form { width: 100%; padding: 20px; background: #fff; box-shadow: 0 2px 5px #ccc; } input, select, textarea { width: 100%; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 3px; } input { width: calc(100% - 10px); padding: 5px; } input:hover, textarea:hover, select:hover { outline: none; border: 1px solid #095484; } select { padding: 7px 0; background: transparent; } textarea { margin-bottom: 3px; } .item { position: relative; display: flex; flex-direction: column; margin: 10px 0; } input[type="date"]::-webkit-inner-spin-button { display: none; } .item i, input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; font-size: 20px; color: #a9a9a9; } .item i { left: 94%; top: 30px; z-index: 1; } [type="date"]::-webkit-calendar-picker-indicator { left: 93%; z-index: 2; opacity: 0; cursor: pointer; } .street, .desired-outcome-item, .complaint-details-item { display: flex; flex-wrap: wrap; } .street input { margin-bottom: 10px; } small { display: block; line-height: 16px; opacity: 0.7; } .btn-block { margin-top: 20px; text-align: center; } button { width: 150px; padding: 10px; border: none; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; background-color: #095484; font-size: 16px; color: #fff; cursor: pointer; } button:hover { background-color: #0666a3; } @media (min-width: 568px) { input { width: calc(35% - 20px); margin: 0 0 0 8px; } select { width: calc(50% - 8px); margin: 0 0 10px 8px; } .item { flex-direction: row; align-items: center; } .item p { width: 30%; } .item i { left: 61%; top: 25%; } [type="date"]::-webkit-calendar-picker-indicator { left: 60%; } .street, .desired-outcome-item, .complaint-details-item { width: 70%; } .street input { width: calc(50% - 20px); } .street .street-item { width: 100%; } .address p, .desired-outcome p, .complaint-details p { align-self: flex-start; margin-top: 6px; } .desired-outcome-item, .complaint-details-item { margin-left: 12px; } textarea { width: calc(100% - 6px); } } </style> </head> <body> <div class="testbox"> <form action="/"> <h1>Complaint Form</h1> <p>Please send us details about the incident you would like to report. Our Complaint Center will analyze your complaint and take the appropriate measures in order that the reported situation will not occur at any other time in the future.</p> <hr/> <div class="item"> <p>Date of complaint</p> <input type="date" name="name" required/> <i class="fas fa-calendar-alt"></i> </div> <div class="item"> <p>Name</p> <input type="text" name="name" placeholder="First" /> <input type="text" name="name" placeholder="Last" /> </div> <div class="item"> <p>Email</p> <input type="text" name="name"/> </div> <div class="item address"> <p>Address</p> <div class="street"> <input class="street-item" type="text" name="name" placeholder="Street address" /> <input class="street-item" type="text" name="name" placeholder="Street addres line 2" /> <input type="text" name="name" placeholder="City" /> <input type="text" name="name" placeholder="Region" /> <input type="text" name="name" placeholder="Postal / zip code" /> <select> <option value="">Country</option> <option value="1">Russia</option> <option value="2">Germany</option> <option value="3">France</option> <option value="4">Armenia</option> <option value="5">USA</option> </select> </div> </div> <div class="item"> <p>Date of the reported incident</p> <input type="date" name="name" required/> <i class="fas fa-calendar-alt"></i> </div> <div class="item location"> <p>Incident location</p> <input type="text" name="name"/> </div> <div class="item complaint-details"> <p>Complaint details</p> <div class="complaint-details-item"> <textarea rows="5"></textarea> </div> </div> <div class="item desired-outcome"> <p>Desired outcome</p> <div class="desired-outcome-item"> <textarea rows="5"></textarea> <small>By signing you declare that all information you have entered is truthful and accurate.</small> </div> </div> <h4>Your signature</h4> <textarea rows="5"></textarea> <small>By signing you declare that all information you have entered is truthful and accurate.</small> <div class="btn-block"> <button type="submit" href="/">Send</button> </div> </form> </div> </body> </html>