Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/07/2009, 17:48
Nathan_1979
 
Fecha de Ingreso: mayo-2007
Mensajes: 348
Antigüedad: 16 años, 10 meses
Puntos: 9
Respuesta: Ayuda: como colocar 2 divs juntos, uno ancho fijo el otro variable

Creo que te has confundido poniendole 500px al padre pero ahí va una solución

Código HTML:
<!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" lang="es">
    
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">

div#padre {
	 height:28px;
	 width:500px;
		background-color:#4f4f4f;
}
	div#left {
		float:left;
		height:28px;
		width:100%;
		margin-right:-5px;
		background-color:#c39;
	}
	
	div#right {
		float:left;
		width:5px;
		height:28px;
		background-color:#cc6;
	}
</style>

</head>

<body>

<div id="padre">
     <div id="left">left</div>
     <div id="right">right</div>
</div>
</body>
</html> 
Con poner en div#padre {width:100%; } obtendrás lo que quieres creo...

Un saludo.
__________________
Debian Squeeze rules!