Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/06/2012, 08:16
carlosuc99
 
Fecha de Ingreso: junio-2011
Mensajes: 342
Antigüedad: 12 años, 10 meses
Puntos: 5
Respuesta: Alinear Formulario

Cita:
Iniciado por emprear Ver Mensaje
Descartá el uso de <font> y estilizá con css
Para la alineación, utilizá la eqtiqueta <label> aplicale la propiedad

display: inline-block;
+más un ancho fijo
y jugá con los márgenes para espaciarlas

Ejemplo
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <title>titulo</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <style type="text/css">
  7. /*<![CDATA[*/
  8.  
  9. input{
  10. margin: 0;
  11. }
  12.  
  13. label{
  14. display: inline-block;
  15. width: 180px;
  16. margin-right: 20px;
  17. }
  18. input[type="text"]{
  19. margin-bottom: 5px;
  20. }
  21. /*]]>*/
  22. </head>
  23. <form action="#">
  24. <div>
  25. <label for="nombre">Nombre</label> <input type="text" id="nombre" name="nombre" /><br />
  26. <label for="apellido">Apellido</label> <input type="text" id="apellido" name="apellido" /><br />
  27. <label><!-- fix --></label> <input type="submit" name="procesar" />
  28. </div>
  29. </form>
  30. </body>
  31. </html>

Saludos
Funciona de lujo, pero cómo puedo cambiar el tipo de letra??? Y dejar más espacio entre cada columna????