Jump to content

Image as button (Vertical align)


ze1d
 Share

Recommended Posts

Hi all,I have a form that contains a textbox and an image as a button, The textbox and the image are placed inside a table data like this:

<tr><td class="td2"><p><input type="text" size="34" name="q" id="q" /> <img src="images/b1.GIF" alt="Search!" /></p></td></tr>

And class td2 is:.td2 {width : 400px;height : 30px; text-align : center;}My image looks to be shifted to the top (NOTE: they have the both height size).See this sample:http://www.search4jordan.com/Sample.bmpSo is there any way to make them look like standing at the same line?Thanks in advance,zeid

Link to comment
Share on other sites

Take the <p> tags out of your <td>. If that doesn't work then:

.td2 {width : 400px;height : 30px; text-align : center; vertical-align: middle;}

Link to comment
Share on other sites

I tried using the <span> and align it in the middle .. This worked with IE but not FireFox..Any help?

<tr><td class="td2"><input type="text" size="34" name="q" /> <span style="vertical-align:middle"><img src="images/b1.GIF" alt="Search!" /></span></td></tr>

Link to comment
Share on other sites

I tried using the <span> and align it in the middle .. This worked with IE but not FireFox..Any help?

<tr><td class="td2"><input type="text" size="34" name="q" /> <span style="vertical-align:middle"><img src="images/b1.GIF" alt="Search!" /></span></td></tr>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...