![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
12/06/2012, 18:32
|
| | Fecha de Ingreso: junio-2012 Ubicación: San Blas
Mensajes: 5
Antigüedad: 12 años, 7 meses Puntos: 3 | |
Respuesta: Alinear cajas de texto Hola,
he cogido tu código y lo he compuesto, creo que lo que querías era más o menos lo siguiente:
AÑADIDOS AL CSS:
#form1 div label{
width:50%;
}
#form1 input [type="text"]{
margin-left:30px;
}
.claseLabel{
width:400px;/*Aquí determinas la posición visual del label*/
float: left;
text-align:right;
}
p{
width:800px;
}
DONDE TENGAS EL FORMULARIO AÑADE A CADA LABEL LA CLASE DENTRO DE UN SPAN:
<form id="form1" name="form1" method="post" action="" onSubmit="return comprobarClave(this)">
<p>
<span class="claseLabel">
<label for="usuarioE">Usuario</label>
</span>
<input type="text" name="usuarioE" id="usuarioE" style="margin-left:1%; width:150px; margin-bottom:30px;"/>
<br />
<span class="claseLabel">
<label for="password">Contraseña</label>
</Span>
<input type="password" name="password" id="password" style="margin-left:1%; width:150px; margin-bottom:30px;"/>
<br />
<span class="claseLabel"> <label for="password2" style="margin-left:30%;">Repetir Contraseña</label></span>
<input type="password" name="password2" id="password2" style="margin-left:1%; width:150px; margin-bottom:30px;"/>
<br />
<input type="submit" name="Establecer_Password" id="Enviar" value="Enviar" style="margin-left:35%; margin-top:30px;"/>
<input type="reset" name="Cancelar" id="Cancelar" value="Cancelar" style="margin-left:10%;margin-top:30px;"/>
</p>
</form>
Y debería funcionarte.
Puedes mirarlo en: http://www.bloque5.com/dominios/pruebas/index.html
Un saludo |