I have an html5 date picker in my form for the mobile version of my site. All my text inputs are set to width: 100%, and the parent td is set to padding-right: 15px so that it matches. This means that my fields are well formatted and always allow me to fill half the container when changing the orientation of the device. However, choosing a date does not behave the same, can anyone help?
the form:
<form method="get" action="home"> <table id="form"> <tr><td> <input type="text" name="Title" class="tbox" placeholder="Title" /> </td><td> <input type="text" name="Genre" class="tbox" placeholder="Genre" /> </td></tr> <tr><td> <input type="text" name="Location" class="tbox" placeholder="Location" /> </td><td> <input type="date" name="Date" class="tbox" placeholder="DD/MM/YY" /> </td></tr> <tr><td> <input type="text" name="postcode" class="tbox" id="postcode" placeholder="Postcode" /> </td><td> <input type="number" name="radius" class="tbox" placeholder="Mile Radius" /><br /> </td></tr> </table> <input type="submit" value="Search" /> </form>
Matching CSS:
.tbox { background-color: #a1c9ff; border: 1px solid #003f94; width: 100%; height: 30px; margin: 3px 2px; padding: 0 5px; border-radius: 15px; font-size: 18px; float: left; } table#form tr td { overflow: hidden; padding-right: 15px; }
source share