Solved

align input field with image button

Posted on 2006-07-19
5
2,404 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using custom html tags with differnt name but exact styling as existing ones 5 55
Basic JavaScript Question 3 38
html input type 3 22
Not seen Link button 5 17
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Find out what you should include to make the best professional email signature for your organization.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now