Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Employee Availability 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, textarea, label { padding: 0; margin: 0; outline: none; font-family: Roboto, Arial, sans-serif; font-size: 14px; color: #666; line-height: 22px; } h1 { position: absolute; margin: 0; line-height: 40px; font-size: 40px; color: #fff; z-index: 2; line-height: 83px; } .testbox { display: flex; justify-content: center; align-items: center; height: inherit; padding: 20px; } form { width: 100%; padding: 20px; border-radius: 6px; background: #fff; box-shadow: 0 0 8px #cc7a00; } .banner { position: relative; height: 300px; background-image: url("/uploads/media/default/0001/02/095995dadd0a1a9d5d83e6a467edf9ef7f35c114.jpeg"); background-size: cover; display: flex; justify-content: center; align-items: center; text-align: center; } .banner::after { content: ""; background-color: rgba(0, 0, 0, 0.2); position: absolute; width: 100%; height: 100%; } input, select, textarea { margin-bottom: 10px; border: 1px solid #ccc; border-radius: 3px; } input { width: calc(100% - 10px); padding: 5px; } input[type="date"] { padding: 4px 5px; } textarea { width: calc(100% - 12px); padding: 5px; } .item:hover p, .item:hover i, .question:hover p, .question label:hover, input:hover::placeholder { color: #cc7a00; } .item input:hover, .item select:hover, .item textarea:hover { border: 1px solid transparent; box-shadow: 0 0 3px 0 #cc7a00; color: #cc7a00; } .item { position: relative; margin: 10px 0; } .item span { color: red; } input[type="date"]::-webkit-inner-spin-button { display: none; } .item i, input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; font-size: 20px; color: #cc7a00; } .item i { right: 1%; top: 30px; z-index: 1; } [type="date"]::-webkit-calendar-picker-indicator { right: 1%; z-index: 2; opacity: 0; cursor: pointer; } input[type=radio], input[type=checkbox] { display: none; } label.radio { position: relative; display: inline-block; margin: 5px 20px 15px 0; cursor: pointer; } .question span { margin-left: 30px; } .question-answer label { display: block; } label.radio:before { content: ""; position: absolute; left: 0; width: 17px; height: 17px; border-radius: 50%; border: 2px solid #ccc; } input[type=radio]:checked + label:before, label.radio:hover:before { border: 2px solid #cc7a00; } label.radio:after { content: ""; position: absolute; top: 6px; left: 5px; width: 8px; height: 4px; border: 3px solid #cc7a00; border-top: none; border-right: none; transform: rotate(-45deg); opacity: 0; } input[type=radio]:checked + label:after { opacity: 1; } .btn-block { margin-top: 10px; text-align: center; } button { width: 150px; padding: 10px; border: none; border-radius: 5px; background: #cc7a00; font-size: 16px; color: #fff; cursor: pointer; } button:hover { background: #ff9800; } @media (min-width: 568px) { .name-item, .city-item { display: flex; flex-wrap: wrap; justify-content: space-between; } .name-item input, .name-item div { width: calc(50% - 20px); } .name-item div input { width:97%;} .name-item div label { display:block; padding-bottom:5px; } } </style> </head> <body> <div class="testbox"> <form action="/"> <div class="banner"> <h1>Employee Availability Form</h1> </div> <div class="item"> <label for="name">Name<span>*</span></label> <div class="name-item"> <input id="name" type="text" name="name" placeholder="First" /> <input type="text" name="name" placeholder="Last" /> </div> </div> <div class="item"> <label for="email">Email<span>*</span></label> <input id="email" type="email" name="email"/> </div> <div class="item"> <label for="bdate">Schedule for Week Beginning Monday<span>*</span></label> <input id="bdate" type="date" name="bdate" required/> <i class="fas fa-calendar-alt"></i> </div> <div class="question"> <label>Is this your initial form for this week, or are you updating your availability?</label> <div class="question-answer"> <div> <input type="radio" value="none" id="radio_1" name="availability"/> <label for="radio_1" class="radio"><span>Initial availability form for this week</span></label> </div> <div> <input type="radio" value="none" id="radio_2" name="availability"/> <label for="radio_2" class="radio"><span>Updated availability form for this week</span></label> </div> </div> </div> <div class="item"> <div class="name-item"> <div> <label for="monday">Time you are available for Monday</label> <input id="monday" type="text" name="name" /> </div> <div> <label for="tuesday">Time you are available for Tuesday</label> <input id="tuesday" type="text" name="name" /> </div> </div> </div> <div class="item"> <div class="name-item"> <div> <label for="wednesday">Time you are available for Wednesday</label> <input id="wednesday" type="text" name="name" /> </div> <div> <label for="thursday">Time you are available for Thursday</label> <input id="thursday" type="text" name="name" /> </div> </div> </div> <div class="item"> <div class="name-item"> <div> <label for="friday">Time you are available for Friday</label> <input id="friday" type="text" name="name" /> </div> <div> <label for="saturday">Time you are available for Saturday</label> <input id="saturday" type="text" name="name" /> </div> </div> </div> <div class="item"> <label for="sunday">Time you are available for Sunday</label> <input id="sunday" type="text" name="language"/> </div> <div class="item"> <label for="comment">Comments/Explanations/Exceptions</label> <textarea id="comment" rows="3"></textarea> </div> <div class="btn-block"> <button type="submit" href="/">Send</button> </div> </form> </div> </body> </html>