Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Line up input box with gif submit button.

Posted on 2003-11-21
6
Medium Priority
?
969 Views
Last Modified: 2007-12-19
Hi,

How can i get the input box and gif submit in line in this code. As it is the gif appears too high.

<FORM action=/cgi-bin/lance/search.cgi method=get>

<INPUT
      style="BORDER-RIGHT: #066c9f 1px solid; BORDER-TOP: #066c9f 1px solid; BORDER-LEFT: #066c9f 1px solid; BORDER-BOTTOM: #066c9f 1px solid; BACKGROUND-COLOR: #ecf1f5"
      onfocus=this.select() size=14 value="Find Find" name=keywords>

<INPUT
      type=image height=30 alt=Search width=22
      src="refferals_files/search.gif" value=Submit border=0 name=go2>
      </FORM></P>
0
Comment
Question by:macuser777
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Accepted Solution

by:
Barry62 earned 120 total points
ID: 9800129
Try CSS:



<FORM action=/cgi-bin/lance/search.cgi method=get>

<INPUT
      style="BORDER-RIGHT: #066c9f 1px solid; BORDER-TOP: #066c9f 1px solid; BORDER-LEFT: #066c9f 1px solid; BORDER-BOTTOM: #066c9f 1px solid; BACKGROUND-COLOR: #ecf1f5"
      onfocus=this.select() size=14 value="Find Find" name=keywords>

<INPUT
      type=image height=30 alt=Search width=22
      src="refferals_files/search.gif" value=Submit border=0 name=go2 style="vertical-align: middle;">
      </FORM></P>
0
 

Expert Comment

by:TigerBoy
ID: 9800157
How about putting it in a table?  You can set the vertical alignment.  

<FORM action=/cgi-bin/lance/search.cgi method=get>

<table border=1 cellspacing=0 cellpadding=0>
<tr>
<td valign=middle>
<INPUT
      style="BORDER-RIGHT: #066c9f 1px solid; BORDER-TOP: #066c9f 1px solid; BORDER-LEFT: #066c9f 1px solid; BORDER-BOTTOM: #066c9f 1px solid; BACKGROUND-COLOR: #ecf1f5"
      onfocus=this.select() size=14 value="Find Find" name=keywords>
</td><td valign=middle>
<INPUT
      type=image height=30 alt=Search width=22
      src="test.gif" value=Submit border=0 name=go2>
      </td></tr></table></FORM>

If you have white space around your image then it may be hard to center without seeing the image.
0
 
LVL 31

Assisted Solution

by:seanpowell
seanpowell earned 80 total points
ID: 9800884
The CSS code will work - you may find it off by a pixel or 2 depending on your browser. You can also use the absmiddle attribute:

<FORM action=/cgi-bin/lance/search.cgi method=get>
<INPUT style="BORDER-RIGHT: #066c9f 1px solid; BORDER-TOP: #066c9f 1px solid; BORDER-LEFT: #066c9f 1px solid; BORDER-BOTTOM: #066c9f 1px solid; BACKGROUND-COLOR: #ecf1f5"
      onfocus=this.select() size="14" value="Find Find" name="keywords">
<INPUT type=image height="30" alt=Search width="22" src="refferals_files/search.gif" value="Submit" border="0" name="go2" align="absmiddle">
</FORM>
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:Zontar
ID: 9801284
Image inputs create usability and other problems. I suggest you use a standard type="submit" and apply CSS to the input to achieve the desired appearance:

<input type="submit" class="submitButton" value="Search">

.submitButton  { width:125px; height:55px; background-image:url('referrals_files/search.gif');  }
0
 
LVL 4

Author Comment

by:macuser777
ID: 9809929
Thanks all.

I used CSS as Barry62 suggested but had to use the absmiddle code to get it exact
so
30 Barry62
20 georgemarian.

0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9809997
Just glad it didn't give you a javascript error :-)
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question