Ich habe eine HTML5-Datumsauswahl in meinem Formular für eine mobile Version meiner Website. Alle meine Texteingaben sind auf width: 100% gesetzt und die Eltern-td ist auf padding-right gesetzt: 15px, um es passend zu machen. Das bedeutet, dass meine Felder schön formatiert sind und so angepasst werden, dass sie immer die Hälfte des Containers ausfüllen, wenn sich die Ausrichtung des Geräts ändert. Die Datumsauswahl verhält sich jedoch nicht auf die gleiche Weise, kann jemand helfen?iOS HTML5-Datumsauswahl akzeptiert keine Breite: 100%;
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>
Relevante 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;
}
Dies funktioniert wunderbar und sollte die richtige Antwort sein. – jmknoll