Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/11/2010, 10:48
kseso?
Colaborador
 
Fecha de Ingreso: junio-2007
Mensajes: 5.798
Antigüedad: 16 años, 11 meses
Puntos: 539
Respuesta: Centrar a y button en la misma línea

Pruebe lo siguiente. No está optimizado y debería pulir o afinar alguna cosilla, en función del resto de elementos.
El borde de 1px es sólo a efectos visuales.
Código CSS:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Prueba</title>
  6. <style>
  7. .botones {
  8. width: 210px;
  9. height: 30px;
  10. overflow: hidden;
  11. border: 1px solid #444;
  12. }
  13. .boton {
  14.     background-color: #036;
  15.     background-image: url(imagenes/gradiente.png);
  16.     border: 1px solid #036;
  17.     color: #036;
  18.     cursor: pointer;
  19.     font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  20.     font-size: 14px;
  21.     font-weight: bold;
  22.     height: 30px;
  23.     margin: 0 2px 0 2px;
  24.     text-transform: uppercase;
  25.     width: 100px;
  26.     color: #fff;
  27. }
  28.  
  29. .boton:hover {
  30.     background-color: #058;
  31.     color: #058;
  32. }
  33.  
  34. .link {
  35.     display: block
  36.     height: 30px;
  37.     line-height: 28px;
  38.     text-align: center;
  39.     text-decoration: none;
  40.     width: 98px;
  41.     float: left;
  42. }
  43. form {display: inline; float: right;}
  44. </style>
  45. </head>
  46.  
  47. <body>
  48. <div class="botones">
  49.     <a href="" class="boton link">Cancelar</a>
  50.     <form name="enviar" method="post">
  51.         <button type="submit" name="siguiente" class="boton" value="">Siguiente</button>
  52.     </form>
  53. </div>
  54. </body>
  55. </html>