Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/08/2011, 14:16
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: como puedo hacer que el navegador cargue un DIV central?

adivinaré lo que has querido decir. el bloque central no queda ubicado en principio en el lugar en el que finalmente estará cuando la página esté totalmente cargada. en lugar de usar la propiedad display, usa visibility
Cita:
<!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 content="text/html; http-equiv="Content-Type" charset=utf-8"/>
<title></title>
<style type="text/css">
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
position: relative;
}

#principal {
width:100%;
}

#der, #izq{
width:300px;
float:left;
height:500px;
/*display: none;*/
visibility: hidden;
}

#cen {
width:300px;
float:left;
height:500px;
}

#der {background: green;}
#cen {background: blue;}
#izq {background: red;}
</style>
<script type="text/javascript">
function fnc(){
document.getElementById('izq').style.visibility = 'visible';
document.getElementById('der').style.visibility = 'visible';
}

window.onload = setTimeout(function() {fnc();},5000);
</script>
</head>
<body>
<div id="principal">
<div id="der">
</div>
<div id="cen">
</div>
<div id="izq">
</div>
</div>
</body>
</html>