473,770 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
5 59596
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.stylesh eets.

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

Jun 11 '07 #2
On 11 Jun, 12:10, Yohan Blurp <ybl...@aname.n etwrote:
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
Gazing into my crystal ball I observed Yohan Blurp <yb****@aname.n et>
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
In article <11************ *********@i38g2 000prf.googlegr oups.com>,
ro*********@gma il.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
In article <4j************ ********@reader 1.news.saunalah ti.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2712
by: Christian Colberg | last post by:
Hi, I wanted to know how you can insert text to the left and to the right of a marked part of the word. example: Input field says: ... trees are green ... By marking this text and using a button I'd like to have .... <b>trees are green</b> ... Christian
2
17364
by: Rosebud | last post by:
Hello, I'd like some help trying to generate input fields on the fly. What I have on an HTML page is a single text input field labelled #1, e.g. #1 <input type="text">. Next to the field is a button that, on click, I'd like to automatically generate a second text input field below the first, labelled #2. Everytime the button is clicked, another field is created with an incremented label. I explored iframes, but these text fields will...
1
74088
by: John English | last post by:
Is there a way to catch the Enter key being pressed in a text field? I want to submit the form if Enter is pressed in a particular field. I have more than one form on the page, each with a submit button but more than one text field each. TIA, ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je
11
19398
by: Markus Mueller | last post by:
Hi, I'm using a form with a bunch of input tags to enter numbers. Is there any way to make the input field right adjusted, so that the numbers align at the right side instead of the left? Even plain html doesn't work, could java script or something else help? Bye Markus
5
10457
by: Mikko Rantalainen | last post by:
See example at <URL:http://www.cc.jyu.fi/~mira/moz/formtest.php>. The problem is that the label of submit button is always centered on the button regardsless of 'text-align' property in CSS. Considering that I can style everything else, this must be a bug, right? Any suggestions how to fix the issue with Mozilla 1.4? How about other versions of Mozilla? How about other browsers? (I'm aware that some people think that one should never...
4
6315
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by the choice from the drop down box. Something like: <form name="populatefrm" id="contactfrm" method="post"
3
5256
by: Chris S | last post by:
I've been unsuccessfully attempting to write a method in Javascript to change an input field from TEXT to SELECT when a user selects (or unselects) a radio button. In my frustration I have been searching the web but have also come up empty handed on any documentation that discribes how to do this. Is what I'm trying to do just not possible?? Thanks, Chris S.
2
1361
by: Dave Almighty | last post by:
I've spent the last couple of hours looking desperately through every corner of the internet for a solution to the following question (and my teeth have been ground down almost to nothing). With a standard text box input, I am appending a string onto it.. but this resets the view to the beginning of the text box. I want it to scroll on so that the newly added text is visible!! That doesn't seem to much to ask does it? But apparently it is....
5
2764
by: omar999 | last post by:
I have a CMS which displays some flight routes, alongside prices, dates which is using asp and sql server 05. works well - i.e an update on the CMS page populates the sql table and then the asp page reflects this update too. only problem is if the price input field is left empty once submitted 0 in entered in to the sql table?? there's no js validation on the cms and the price column is set to integer and it's default value is set to NULL....
0
9432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8891
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5454
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.