473,322 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

easy form layout question

How do I get a label to be on top of a text field?

<label>Login:<input type="text" name="login"></label>
<label>Password:<input type="password" name="password"></label>

generates this...

Login:textbox Password:textbox

I want...

Login: Password:
textbox textbox

Thanks... CM..

Feb 10 '06 #1
1 1475
mo*****@yahoo.com wrote:
How do I get a label to be on top of a text field?
Layout is basically a matter of CSS, not HTML. This is c.i.w.a.html, not
c.i.w.a.stylesheets. Admittedly, you _could_ do some simple layout in
HTML, and, somewhat debatably, this is also about structure.
<label>Login:<input type="text" name="login"></label>
<label>Password:<input type="password" name="password"></label>

generates this...

Login:textbox Password:textbox

I want...

Login: Password:
textbox textbox


That would break users' expectations. That's not the way things are
commonly presented. Besides, it would confuse people who use simple
speech-based user agents that read line by line and ignore <label> markup.

What you _should_ want is

Login: textbox
Password: textbox

and a way to achieve this is

<form action="..." method="post">
<table>
<tr><td><label for="username">Login</label>:</td>
<td><input id="username" type="text" name="login"></td></tr>
<tr><td><label for="pwd">Password</label>:</td>
<td><input id="pwd" type="text" name="password"></td></tr>
</table>
</form>

If you really want the layout you describe, the table approach can be
used with obvious modifications.
Feb 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dan | last post by:
A Newbie needs help! Is it possible, in PHP, to capture the resulting HTML of a submitted form returning from a server and incorporate that HTML into say a table, or some predefined layout? I...
4
by: Rick Brown | last post by:
I have a form built in Access2000 that looks like the hardcopy in all ways including color. I now want to move this form to the company Intra-Net via ASP.NET. Is there a way to wizard this form...
10
by: Tom | last post by:
I am looking for some ideas for how to design the layout of the form for data entry and to display the data for the following situation: There are many sales associates. A sales associate can work...
7
by: Mike | last post by:
Hi! I posted this question in browser_ctl group as well but got no results. I have a form with embedded WebBrowser. Upon clicking on a link in the embedded webbrowser that calls JavaScript's...
3
by: Maloney | last post by:
Does anybody know of a library in c# that will aid in making resizable dialogs? Similar to http://www.gipsysoft.com/articles/dialogsizer/ http://www.codeproject.com/dialog/easysize.asp but...
10
by: Brian | last post by:
Hello all, I have an form to Enter a Name with letters from A to Z in buttons. When you click a button, it should append the text associated with that button to a text box. Instead of...
2
by: Steve Richter | last post by:
I am spending too much time thinking of nesting tables within tables to get the form layout that I want. a simple example: Sub heading: property text: entry field property text: entry...
22
by: Woody Splawn | last post by:
I am somewhat new to VS.net in general. As a result I am prone to make mistakes. When adding some new feature to a a form it would be nice if I could back it up before trying something that might...
6
by: fidodido | last post by:
I was asked to do this.... Dynamically move "text1" and "hidden1" into the "form1" ..... Not by creating new elements, but moving the "text1" and "hidden1" elements into the form using javascript,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.