By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

How to align text label and input field's text ?

P: n/a
Hi,

Here is sample page to show you the problem :

<html><body>
<form action="/cgi-bin/test.cgi" method="post">
Data Path : <input type="text" size="50" value="C:\Test Data\May
2007.xls" style='border: thin solid #FFFFFF'></form>
</body></html>

I would like the text label and text in input field be exactly
vertically aligned in all main browsers : IE, Netscape, Firefox,
Mozilla, Opera, Konqueror, etc.

How to do ?

Jun 11 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Scripsit Yohan Blurp:
Here is sample page to show you the problem :
It's not a page. It's just a fragment of code. In future, please post a URL.
<html><body>
<form action="/cgi-bin/test.cgi" method="post">
Data Path : <input type="text" size="50" value="C:\Test Data\May
2007.xls" style='border: thin solid #FFFFFF'></form>
</body></html>
I wonder what you expect to achieve, in WWW terms, by using a text input
field initialized to something that looks like a path filename in a
particular computer. Moreover, a form without a submit button is not very
safe, and it looks odd. Besides, you should use <labelmarkup, for
accessibility, to associate the label text with the corresponding field.
I would like the text label and text in input field be exactly
vertically aligned in all main browsers : IE, Netscape, Firefox,
Mozilla, Opera, Konqueror, etc.
That's not an HTML issue but a matter of styling (CSS). Besides, it's not
particularly important, and it's not really possible, due to the different
interpretations and implementations of the vertical-align property. But
_after_ you have created a functional page and tested it, feel free to ask
for ideas on styling in c.i.w.a.stylesheets.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jun 11 '07 #2

P: n/a
On 11 Jun, 12:10, Yohan Blurp <ybl...@aname.netwrote:
Hi,

Here is sample page to show you the problem :

<html><body>
<form action="/cgi-bin/test.cgi" method="post">
Data Path : <input type="text" size="50" value="C:\Test Data\May
2007.xls" style='border: thin solid #FFFFFF'></form>
</body></html>

I would like the text label and text in input field be exactly
vertically aligned in all main browsers : IE, Netscape, Firefox,
Mozilla, Opera, Konqueror, etc.
<form action="/cgi-bin/test.cgi" method="post">
<label for="x" style="vertical-align: middle">Data Path :</label>
<input type="text" size="50" name="x" value="C:\Test Data\May
2007.xls" style='border: thin solid #FFFFFF; vertical-align: middle'>
</form>

Jun 12 '07 #3

P: n/a
Gazing into my crystal ball I observed Yohan Blurp <yb****@aname.net>
writing in news:MP************************@news.tiscali.fr:
Hi,

Here is sample page to show you the problem :

<html><body>
<form action="/cgi-bin/test.cgi" method="post">
Data Path : <input type="text" size="50" value="C:\Test Data\May
2007.xls" style='border: thin solid #FFFFFF'></form>
</body></html>

I would like the text label and text in input field be exactly
vertically aligned in all main browsers : IE, Netscape, Firefox,
Mozilla, Opera, Konqueror, etc.

How to do ?
Have a look at http://www.intraproducts.com/usenet/requiredform.asp
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jun 12 '07 #4

P: n/a
In article <11*********************@i38g2000prf.googlegroups. com>,
ro*********@gmail.com says...
<form action="/cgi-bin/test.cgi" method="post">
<label for="x" style="vertical-align: middle">Data Path :</label>
<input type="text" size="50" name="x" value="C:\Test Data\May
2007.xls" style='border: thin solid #FFFFFF; vertical-align: middle'>
</form>
Thanks, I've effectively used that
Jun 14 '07 #5

P: n/a
In article <4j********************@reader1.news.saunalahti.fi >,
jk******@cs.tut.fi says...
I wonder what you expect to achieve, in WWW terms, by using a text input
field initialized to something that looks like a path filename in a
particular computer. Moreover, a form without a submit button is not very
safe, and it looks odd. Besides, you should use <labelmarkup, for
accessibility, to associate the label text with the corresponding field.
I've finally used <label>. However, because I didn't used <labelin the
past and, by that way, could know it was possible to apply a vertical-
align here, i could be aware of the fact the right group was about
stylesheet. When you ask a question you don't always know the domain of
solution !
Jun 14 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.