Foros del Web » Creando para Internet » HTML »

Problema al centrar la tabla

Estas en el tema de Problema al centrar la tabla en el foro de HTML en Foros del Web. Hola Estoy con una web y hago una tabla y dentro otra para alinear pero el problema es que en una pantalla grande el contenido ...
  #1 (permalink)  
Antiguo 07/09/2007, 04:53
 
Fecha de Ingreso: agosto-2006
Mensajes: 78
Antigüedad: 17 años, 8 meses
Puntos: 0
Problema al centrar la tabla

Hola
Estoy con una web y hago una tabla y dentro otra para alinear pero el problema es que en una pantalla grande el contenido se ve arriba del todo y me gustaría que se viese en el centro, verticalmente hablando. A ver si alguien me puede ayudar.
El código es el siguiente:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
body {
background-color: #E6E6E6;
}
.Estilo8 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 10px;
text-align:left;
color: #999999;
}
-->
</style></head>

<body>
<p>
<div align="center">
<table border="0" width="100%" cellpadding="0" cellspacing="0" height="100%">
<tr>
<td align="center" valign="middle">
<table width="800" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="800" height="80" valign="top" colspan="3">
<!--CONTENIDO DE LA CELDA-->
</td>
</tr>
<tr>
<td width="800" height="5" bgcolor="#D5E1F4" valign="top" colspan="3">&nbsp;</td>
</tr>
<tr>
<td align="center" width="800" height="50">
<!--CONTENIDO DE LA CELDA-->
</td>
</tr>
<tr>
<td width="800" height="5" bgcolor="#D5E1F4" valign="top" colspan="3">&nbsp;</td>
</tr>
<tr>
<td width="800" height="330" valign="top" colspan="3">
<!--CONTENIDO DE LA CELDA-->
</td>
</tr>
<tr>
<td width="800" height="20" bgcolor="#D5E1F4" valign="middle" colspan="3"><div align="left"><span class="Estilo8">
<!--CONTENIDO DE LA CELDA-->
</span></div></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
  #2 (permalink)  
Antiguo 07/09/2007, 05:03
Avatar de pzin
Moderata 😈
 
Fecha de Ingreso: julio-2002
Ubicación: Islas Canarias
Mensajes: 10.488
Antigüedad: 21 años, 8 meses
Puntos: 2114
Re: Problema al centrar la tabla

Tendías que cambiar valign="top" por valign="middle".
  #3 (permalink)  
Antiguo 07/09/2007, 05:30
 
Fecha de Ingreso: agosto-2006
Mensajes: 78
Antigüedad: 17 años, 8 meses
Puntos: 0
Re: Problema al centrar la tabla

Cita:
Iniciado por Bonez Ver Mensaje
Tendías que cambiar valign="top" por valign="middle".
No, ya lo había probado, lo he vuelto a cambiar y me sigue poniendo toda la tabla en la parte de arriba
  #4 (permalink)  
Antiguo 10/09/2007, 04:02
 
Fecha de Ingreso: agosto-2006
Mensajes: 78
Antigüedad: 17 años, 8 meses
Puntos: 0
Re: Problema al centrar la tabla

Nadie? es que no hay manera de centrarla verticalmente
  #5 (permalink)  
Antiguo 11/09/2007, 06:40
Avatar de bookmaster  
Fecha de Ingreso: febrero-2002
Ubicación: Toledo
Mensajes: 976
Antigüedad: 22 años, 2 meses
Puntos: 67
Re: Problema al centrar la tabla

Si quitas el
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Se centraria seguro, lo malo que no estarias bajo los estandares, yo en XHTML no he conseguido centrarlo.
__________________
Decir si te a funcionado la respuesta es ¡GRATIS!. Por favor indicarlo.
http://www.lohacemosweb.net
http://tutoriales.lohacemosweb.net
  #6 (permalink)  
Antiguo 11/09/2007, 09:43
 
Fecha de Ingreso: agosto-2006
Mensajes: 78
Antigüedad: 17 años, 8 meses
Puntos: 0
Re: Problema al centrar la tabla

Y que inconvenientes tendría no estar bajo los estandares, ¿es recomendable?
  #7 (permalink)  
Antiguo 11/09/2007, 09:53
Avatar de bookmaster  
Fecha de Ingreso: febrero-2002
Ubicación: Toledo
Mensajes: 976
Antigüedad: 22 años, 2 meses
Puntos: 67
Re: Problema al centrar la tabla

Lo suyo es trabajar bajo los estandares, ya que te "garantiza" que la página se vea en todos los navegadores por igual (Aunque todos sabemos que no es así, pero bueno).

Aparte de eso, si tu haces un buen trabajo adaptandolo para que no falle y se vea bien en todos los navegadores, no deberias de tener mas problemas.
__________________
Decir si te a funcionado la respuesta es ¡GRATIS!. Por favor indicarlo.
http://www.lohacemosweb.net
http://tutoriales.lohacemosweb.net
  #8 (permalink)  
Antiguo 11/09/2007, 10:04
 
Fecha de Ingreso: agosto-2006
Mensajes: 78
Antigüedad: 17 años, 8 meses
Puntos: 0
Re: Problema al centrar la tabla

OK gracias
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 01:37.