Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/08/2011, 17:58
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 9 meses
Puntos: 793
Respuesta: Llenar espacio horizontal con una div de tamaño fijo y una variable

Lo que pasa es que Internet Explorer no es adivino y necesita de un DOCTYPE. Así funciona perfectamente en IE 9.

Código CSS:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Documento sin título</title>
  6.  
  7. <style type="text/css">
  8.  
  9.     #contenedor{
  10.         text-align:left;
  11.         width:90%;
  12.         height:900px;
  13.     }
  14.  
  15.     #encabezado{
  16.         height:160px;
  17.         width:100%;
  18.  
  19.     }
  20.  
  21.     #logo{
  22.         float:left;
  23.         margin-left:0px;
  24.         margin-right:0px;
  25.         background-color:#FFF;
  26.  
  27.     }
  28.  
  29.     #head2{
  30.         margin-top:10px;
  31.         width:100%;
  32.         height:109px;
  33.     }
  34.     .separador{
  35.         background-color:transparent;
  36.         height:2px;
  37.     }
  38.     #destacado1{
  39.         width:100%;
  40.         height:37px;
  41.         background-color:#f99d02;
  42.     }
  43.  
  44.     #Buscador{
  45.         width:100%;
  46.         height:44px;
  47.         background-color:#cacace;
  48.     }
  49.  
  50.     #destacado2{
  51.         width:100%;
  52.         height:24px;
  53.         background-image:url(../img/back_destacado2.jpg);
  54.  
  55.     }
  56.  
  57. </style>
  58.  
  59. </head>
  60. <body>
  61. <div id="encabezado">
  62.     <div id="logo">
  63.         <img src="template/img/lOGO.gif" width="224px" height="152px" >
  64.     </div>
  65.  
  66.     <div id="head2">
  67.         <div id="destacado1">
  68.  
  69.         </div>  
  70.  
  71.         <div class="separador"></div>  
  72.  
  73.         <div id="Buscador">
  74.  
  75.         </div>
  76.         <div class="separador"></div>
  77.         <div id="destacado2">
  78.  
  79.         </div>
  80.     </div>
  81.  
  82. </div>
  83.    
  84.    
  85. </body>
  86. </html>
__________________
Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar - PHP