Foros del Web » Creando para Internet » CSS »

[SOLUCIONADO] centrar caja

Estas en el tema de centrar caja en el foro de CSS en Foros del Web. como puedo hacer para que la caja se centre? @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código HTML: Ver original < html > < head >     < meta ...
  #1 (permalink)  
Antiguo 07/06/2018, 15:02
 
Fecha de Ingreso: abril-2016
Mensajes: 44
Antigüedad: 8 años
Puntos: 0
centrar caja

como puedo hacer para que la caja se centre?

Código HTML:
Ver original
  1.     <meta charset="UTF-8">
  2.     <meta name="viewport" content="width=device-width, user-scalable=no,
  3.     initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  4. <link href="https://fonts.googleapis.com/css?family=Slabo+27px" rel="stylesheet">
  5. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
  6. </head>
  7.     <div class="caja">
  8.         <form method="POST" action="">
  9.             <h1>Iniciar Sesión</h1>
  10.             <p><img src="images/user.png" width="200px" height="200px"/></p>
  11.             <p>Correo electrónico</p>
  12.             <p><input type="text" name="email"></p>
  13.             &nbsp;
  14.             <p>Contraseña</p>
  15.             <p><input type="password" name="pass"></p>
  16.             &nbsp;
  17.             <p><input type="submit" value="Registrar"></p>
  18.         </form>
  19.         <p>&nbsp;</p>
  20.         <p>&nbsp;</p>
  21.         <p>&nbsp;</p>
  22.         <p><a href="registro.php">¿Aún no tienes cuenta?</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">¿Olvidaste la contraseña?</a></p>
  23.     </div>
  24. </body>
  25. </html>


Código CSS:
Ver original
  1. * {
  2.     margin: 0;
  3.     padding: 0;
  4.     -webkit-box-sizing: border-box;
  5.     -moz-box-sizing: border-box;
  6.     box-sizing: border-box;
  7. }
  8.  
  9. body {
  10.     font-size: 16px;
  11.     font-family: 'Slabo 27px', serif;
  12.     background: #232931;
  13.     color: #fff;
  14. }
  15.  
  16. h1, h2, h3, h4, h5, h6 {
  17.     font-family: 'Slabo 27px', serif;
  18.     font-weight: normal;
  19. }
  20.  
  21. input[type="text"],input[type="password"] {
  22.     margin:0 0 1em 0;
  23.     width:250px;
  24.     border:0px;
  25.     padding:8px;
  26.     border-radius:3px;
  27. }
  28.  
  29. input[type=submit], form a{
  30.     padding:1em;
  31.     background:#A4A4A4;
  32.     border:none;
  33.     color:white;
  34.     font-size:14px;
  35.     border-radius:3px;
  36.     text-decoration:none;
  37.     width:100px;
  38. }
  39.  
  40. .caja {
  41.     font-size: 18px;
  42.     font-weight: 400;
  43.     text-align: center;
  44.     color: #ffffff;
  45.     background: #889ccf;
  46.     width:400px;
  47.     height:600px;
  48.     margin: 0 0 25px;
  49.     overflow: hidden;
  50.     padding: 20px;
  51.     border-radius: 35px 0px 35px 0px;
  52.     -moz-border-radius: 35px 0px 35px 0px;
  53.     -webkit-border-radius: 35px 0px 35px 0px;
  54.     border: 2px solid #5878ca;
  55. }

Etiquetas: caja, html
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:37.