easy form layout question

M

mouac01

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..
 
T

Toby Inkster

mouac01 said:
Login: Password:
textbox textbox

<style type="text/css">
FORM DIV.lp {
width: 47%;
float: left;
}
FORM DIV.lp INPUT
{
width: 85%;
}
</style>

<form action="blah" method="POST">
<div class="lp">
<label>Login:<br>
<input type="text" name="login"></label>
</div>
<div class="lp">
<label>Password:<br>
<input type="password" name="password"></label>
</div>
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top