可能重复:
Whitespace around Image
无法弄清楚我是如何在我的图像周围获得额外的空白区域的:
标记:
<div id="searchCriteria-Wrapper">
<p>@Html.Label("Contract #: ")</p><p> @Html.TextBox("searchCriteria")</p><p><input type="button" id="searchButton" title="Submit" value="Search" /></p>
</div>
样式:
input, textarea
{
border: 1px solid #e2e2e2;
background: #fff;
color: #333;
font-size: .9em;
margin: 5px 0 6px 0;
padding: 5px 2px 5px 5px;
width: 300px;
}
img
{
display: block; /* gets rid off any unexpected margins round the image */
border: 0px;
}
input[type="submit"], input[type="button"], button
{
background-color: #ffffff;
cursor: pointer;
font-size: 11px;
font-weight: 600;
width: auto;
vertical-align: middle;
border: 0px;
}
td input[type="submit"], td input[type="button"], td button { font-size: 1em; }