doominabox1 doominabox1 - 1 month ago 8
HTML Question

How to align text and select box horizontally?

This code produces

<table>
<tr>
<td NOWRAP><?php echo "Employee Birthdays for " . $monthName; ?></td>
<td width="100%"></td>
<td>Browse:</td>
<td valign="middle">
<form method="get">
<select type="submit" name="mo" onchange="this.form.submit()">
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
</form>
</td>
</tr>
</table>


This picture:enter image description here

How can I get the month selector box to actually line up with "Browse:"?

Edit: I should note that this works in IE, but in Chrome it's misaligned.

Answer

add any one code in your css

form{
  margin-bottom: 0em;
}

or

form{
  margin-bottom: 0em !important;
}
Comments