Increasing HTML form size
For the HTML form below, the entry field, button, and entry text all seem to be about 12 px. What is the best method of increasing them all? I think I'd like to have them at about 14 px.
开发者_如何学Python<div class="searchbox2">
<form action="sitesearch.php" method="get">
<label>
<input type="text" class="name="find" size="55"/>
<input type="hidden" name="searching" value="yes" />
<input type="submit" name="search" value="search" />
</label>
</form>
</div>
.searchbox2 input {
font-size: 14px
}
input {font-size: 14px; }
But please don't do that. Use ems, or or ex, to size fonts. Otherwise your forms are at the mercy of the resolution of the monitor's display. Ems, or whatever, aren't necessarily perfect, but they're a slightly less fragile means of sizing fonts without, on the user zooming the page, breaking layout. input
input {font-size: 14px; }
Or, for all text within the form:
form {font-size: 1.4em; }
Where the 1.4 will be calculated from the parent of the form.
精彩评论