views:

249

answers:

1

i want to align text box to right in cell of table. it is working in firefox but in internet explorer text box is coming somewhat downwards i.e. it is not coming as perfect as in firefox.

<tr>
    <td id="searchRow">
        <img id="imag"><a href="adminLogin.php" >Admin Login</a>
        <div style="float: right;text-align: right;">Search : <input type="text" id="search"  name="search" onkeypress="return checkEnter(event)"/>
</div>
    </td>
</tr>

above is the code i have used for it. i want Admin Login to be come on left side and search: and text box to be on right side.

A: 

if the text box is not properly vertical aligned, you can use the valign attribute of the div tag:

<div style="float: right;text-align: right;" valign="middle">

or this way:

<div style="float: right;text-align: right;vertical-align: middle;">
anthares