Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/08/2006, 19:14
Avatar de chalchis
chalchis
 
Fecha de Ingreso: julio-2003
Mensajes: 1.773
Antigüedad: 20 años, 9 meses
Puntos: 21
gracias braulito esta muy bien el ejemplo

pero quise hacer algo asi

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Cómo centrar verticalmente un elemento. Ejemplo preparado para la lista CSS Ovillo.</title>

<meta http-equiv="Content-Type" content="text/xml; charset=iso-8859-1" />

<style media="screen" type="text/css">

body {
margin:0px;
padding:0px;
background-color: #EDEDED;
}

#linea
{
width: 100%;
position: absolute;
top: 50%;
background-color: #EDEDED;
text-align: center;
overflow: visible;
}

#caja
{
position: absolute;
width: 200px;
height: 100px;
top: -50px;
left: 50%;
margin-left: -100px;
background-color: #66f;
font-family: 'trebuchet ms', tahoma, arial, sans-serif;
font-weight: bold;
font-size: 26px;
color: #006;
}

</style>

</head>

<body>


<div id="linea">

<div id="caja">

<table width="300" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>


</div>

</div>


</body>
</html>

y lo que yo trato de hacer es que mientras mas crece la tabla el div se vaya centrado a la pantalla consa que no sucede

saludos

espero tus comentarios
__________________
gerardo