Comunidad de diseño web y desarrollo en internet online

duda con posiciones?

Citar            
MensajeEscrito el 15 Feb 2011 07:20 pm
hola amigos del foro, alguien sabe por que un div con posicion absolute no puede hacer que creesca un div con posicion relative? o como puedo hacerlo?

dejo del codigo:

Código HTML :

<!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=UTF-8" />
<title>nuevo</title>
<style type="text/css">
#prin{
   position:relative;
   width:600px;
   height:auto;
   }
#lateral{
   position:absolute;
   width:300px;
   height:200px;
   background-color:#CCC;
   left:50px;
   }
</style>
</head>

<body>
<div id="prin">
   <div id="lateral">
       noticias
    </div>
</div>
</body>
</html>

Por carnicero666

Claber

156 de clabLevel



 

chrome
Citar            
MensajeEscrito el 16 Feb 2011 05:16 pm
En #print cambia a position: static; Eso es todo.
Si aún así necesitas que ese div se posicione relativo a uno más afuera, agrega otro div encerrándolo y ponle a ese un position: relative;

Por DriverOp

Claber

2510 de clabLevel



 

opera

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.