Solved

align input field with image button

Posted on 2006-07-19
5
2,406 Views
Last Modified: 2012-06-27
can someone take a look at

http://www.innergatedesigns.com/work/inputimage/inputimg.php

<div><input type="text" src="buynow.gif" name="button" /><img src="buynow.gif" /></div>

and let me know how i can get these to align across IE and FF.

Thanks.
0
Comment
Question by:redcable
  • 3
5 Comments
 
LVL 2

Expert Comment

by:bowen18
ID: 17141416
This should do it:

<div><input src="buynow.gif" name="button" type="text"><img src="buynow.gif" align="top"></div>
0
 
LVL 2

Expert Comment

by:bowen18
ID: 17141450
Also, I realize "align" is deprecated, but the DTD being used is xhtml transitional.
0
 

Author Comment

by:redcable
ID: 17141694
just realized the button i was working on is actully an input image

<div><input align="top" type="text" src="buynow.gif" name="button" /><input type="image" src="buynow.gif" /></div>

updated


http://www.innergatedesigns.com/work/inputimage/inputimg.php

any thoughts on how to correct this? align="top" didnt seem to work.

thanks again.
0
 
LVL 2

Assisted Solution

by:bowen18
bowen18 earned 100 total points
ID: 17141872
Ah, that does change things a bit:

<div><input src="buynow.gif" name="button" type="text" /><input src="buynow.gif" type="image" style="vertical-align:top" /></div>
0
 
LVL 16

Accepted Solution

by:
sam85281 earned 250 total points
ID: 17142274
You don't want to align it top becayse the input has padding.  Also don't need to put all the src stuff in your text field

Use:

<input name="QUANITY OR WHATEVER" type="text" style='width:30px;' /><input type='button' src="buynow.gif" type="image" align='absmiddle' />

-Sam
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

774 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