473,779 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

easy form layout question

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

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

generates this...

Login:textbox Password:textbo x

I want...

Login: Password:
textbox textbox

Thanks... CM..

Feb 10 '06 #1
1 1493
mo*****@yahoo.c om 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.stylesh eets. Admittedly, you _could_ do some simple layout in
HTML, and, somewhat debatably, this is also about structure.
<label>Login:<i nput type="text" name="login"></label>
<label>Password :<input type="password" name="password" ></label>

generates this...

Login:textbox Password:textbo x

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><labe l for="username"> Login</label>:</td>
<td><input id="username" type="text" name="login"></td></tr>
<tr><td><labe l for="pwd">Passw ord</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
1720
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 am trying to incorporate the resulting HTML into a layout I have created in order to keep the look & feel of my site consistent, but the resulting page is a plain "cheesy" page.
4
5036
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 over to .NET or can this form be rebuilt in a .NET editor retaining the same look? OR????? RICK
10
2889
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 for multiple companies and work for multiple divisions within each company. Within each division he can work in multiple departments and within each department he can work with multiple groups. In each group he works on multiple projects. All the...
7
6521
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 window.open() call where I pass different width, height, top, left and other parameters, I open a new form of the same type as the original. I noticed that the webbrowser in the newly opened form is shifted to the right and bottom leaving gray areas...
3
1527
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 in c#
10
1548
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 having an EventHandler for every button with a click event of:
2
2483
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 field Sub heading: property text: entry field
22
5100
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 mess things up. Also, there are times when a new form is enough like an old one that the best way to create the new report is to simply make a copy of the old one, rename the copy and add modifications. So the question is, how to backup or...
6
2295
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, after i click the submit button.... So if i loop the "form1", i can get the values for "text1" and "hidden1" too..... Is that possible ?
0
9474
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
10137
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
10074
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
9928
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
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
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
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
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.