Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Restaurant 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; } .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 { margin-bottom: 10px; border: 1px solid #ccc; border-radius: 3px; } input { width: calc(100% - 10px); padding: 5px; } select { width: 100%; padding: 7px 0; background: transparent; } textarea { width: calc(100% - 6px); } .item { position: relative; margin: 10px 0; } .item:hover p, .item:hover i { color: #095484; } input:hover, select:hover, textarea:hover { box-shadow: 0 0 5px 0 #095484; } .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) { .name-item, .city-item { display: flex; flex-wrap: wrap; justify-content: space-between; } .name-item input, .city-item input { width: calc(50% - 20px); } .city-item select { width: calc(50% - 8px); } } </style> </head> <body> <div class="testbox"> <form action="/"> <h1>Restaurant Complaint Form</h1> <div class="item"> <p>Establishment Name</p> <input type="text" name="name"/> </div> <div class="item"> <p>Establishment Address</p> <input type="text" name="name" placeholder="Street address"/> <input type="text" name="name" placeholder="Street address line 2"/> <div class="city-item"> <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" selected>Armenia</option> <option value="5">USA</option> </select> </div> </div> <div class="item"> <p>Name</p> <div class="name-item"> <input type="text" name="name" placeholder="First" /> <input type="text" name="name" placeholder="Last" /> </div> </div> <div class="item"> <p>Daytime Phone</p> <input type="text" name="name"/> </div> <div class="item"> <p>Your Address</p> <input type="text" name="name" placeholder="Street address"/> <input type="text" name="name" placeholder="Street address line 2"/> <div class="city-item"> <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" selected>Armenia</option> <option value="5">USA</option> </select> </div> </div> <div class="item"> <p>Please Explain, including date and time in establishment</p> <textarea rows="5"></textarea> </div> <div class="item"> <p>Email</p> <input type="text" name="name"/> </div> <div class="btn-block"> <button type="submit" href="/">SEND</button> </div> </form> </div> </body> </html>