搜索框和搜索对齐

<table border="0" align="center" cellpadding="0" cellspacing="0" class="tab_search">
<tr class="find_input">
<td>
<input type="text" name="q" title="Search" class="searchinput" id="searchinput" onkeydown="if (event.keyCode==13) {}" onblur="if(this.value=='')value=' - Search Company -';" onfocus="if(this.value==' - Search Company -')value='';" value=" - Search Company -" size="10"/>
</td>
<td style="width:40px">
<input type="image" width="21" height="17" class="searchaction" onclick="if(document.forms['search'].searchinput.value=='- Search Company -')document.forms['search'].searchinput.value='';" alt="Search" src="img/[email protected]" border="0" hspace="2"/>
</td>
</tr>
</table>

 

css部分


.find_input td{
padding: 0.12rem 0;
}
.searchinput{
border-right-width: 0px;
padding-left: 0.04rem;
width: 96%;
font-family: arial;
float: left;
border-top-width: 0px;
border-bottom-width: 0px;
color: #636365;
margin-left: 0.053333rem;
font-size: 0.4rem;
outline: none;
vertical-align: middle;
border-left-width: 0px;
margin-right: 0.04rem;
}
.tab_search{
background: #fff;
width:70%;
margin-left: 15%;
margin-right: 15%;
border-bottom: #cccccc 0.013333rem solid;
border-left: #cccccc 0.013333rem solid;
height: 0.6rem;
border-top: #cccccc 0.013333rem solid;
border-right: #cccccc 0.013333rem solid;

}
.searchaction{
width: 0.533333rem;
float: left;
height: 0.533333rem;
}

你可能感兴趣的:(搜索框和搜索对齐)