Foros del Web » Creando para Internet » CSS »

espacio blanco, y background color

Estas en el tema de espacio blanco, y background color en el foro de CSS en Foros del Web. Bueno, voy empesando en esto del CSS y a la hora de maquetar una web SENCILLA me surguieron dos problemitas. El primero es que entre ...
  #1 (permalink)  
Antiguo 26/11/2011, 10:48
 
Fecha de Ingreso: noviembre-2011
Mensajes: 1
Antigüedad: 12 años, 4 meses
Puntos: 0
espacio blanco, y background color

Bueno, voy empesando en esto del CSS y a la hora de maquetar una web SENCILLA me surguieron dos problemitas.

El primero es que entre la cabecera y el menu me deja un espacio en blanco que no quiera que aparesca. No estoy usando imagenes de fondo, sino simples gradents. Ya aplique un reset al CSS y intente con un margin: 0 al div de la cabecera y el menu y sigue igual.

Lo que se me hace raro esque entre el contenido principal y el footer no queda ningun espacio.

Mi segunda duda es que, al flotar mi contenido principal a la izquierda para que mi barra lateral quede a la derecha se elimina el color de fondo, y para que aparesca tengo que ponerle un height al div pero con eso me limite al poner el contenido, alguien sabe porque es?

Les dejo mi codigo:

Código HTML:
<div id="cabecera">
      <div class="interior">
         <div id="nombres">
         <h1>Sin Titulo</h1>
         <small>Ponga Slogan aqui</small>
      </div><!---  end of interior -->
      </div><!---  end of nombres-->
   </div><!---  end of cabecera-->
   
   <div id="menu">
      <div class="interior">
         <div id="menu_principal">
         <ul>
            <li><a href="#">Home</a></li>
            <li><a href="#">Servicios</a></li>
            <li><a href="#">Contacto</a></li>
            <li><a href="#">Quienes somos</a></li>
         </ul>
         </div>
      
      </div><!---  end of interior -->   
   </div><!---  end of menu-->
   <div class="clearfix"></div><!---  end of CLEARFIX -->
   
   <div id="contenido">
      <div class="interior">
         <div id="contenido_principal">
         <p>
         Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
         </p>
         <p>
         Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
         </p>
         <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

        
         </p>
         <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

            Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
         </p>
         </div><!---  end of contenido_principal-->
         
         <div id="barra_lateral">
         
            <a href="#"><img src="imagenes/twitter.jpg"></a>
         
         </div><!---  end of barra lateral-->
         
   
      </div><!---  end of interior -->
   </div><!---  end of contenido-->
   
   
   
   <div id="footer">
   <div class="interior">
      <h5>Plantilla Confugrable</h5>
      <p>Lorem Ipsum is simply dummy</p>
   
   </div><!---  end of interior -->
   </div><!---  end of footer--> 
Código:
/* ESTILOS GENERALES */

#cabecera{
background: #606c88; /* Old browsers */
background: -moz-linear-gradient(top,  #606c88 0%, #3f4c6b 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #606c88 0%,#3f4c6b 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #606c88 0%,#3f4c6b 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #606c88 0%,#3f4c6b 100%); /* IE10+ */
background: linear-gradient(top,  #606c88 0%,#3f4c6b 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#606c88', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */
height:70px;

}

#menu{
   background: #45484d; /* Old browsers */
background: -moz-linear-gradient(top,  #45484d 0%, #000000 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#45484d), color-stop(100%,#000000)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #45484d 0%,#000000 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #45484d 0%,#000000 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #45484d 0%,#000000 100%); /* IE10+ */
background: linear-gradient(top,  #45484d 0%,#000000 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
height:50px;
}

#contenido{
   background: #2c539e; /* Old browsers */
background: -moz-linear-gradient(top,  #2c539e 0%, #2c539e 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2c539e), color-stop(100%,#2c539e)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #2c539e 0%,#2c539e 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #2c539e 0%,#2c539e 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #2c539e 0%,#2c539e 100%); /* IE10+ */
background: linear-gradient(top,  #2c539e 0%,#2c539e 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2c539e', endColorstr='#2c539e',GradientType=0 ); /* IE6-9 */


}

#footer{
   background: #a9e4f7; /* Old browsers */
background: -moz-linear-gradient(top,  #a9e4f7 0%, #0fb4e7 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9e4f7), color-stop(100%,#0fb4e7)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #a9e4f7 0%,#0fb4e7 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #a9e4f7 0%,#0fb4e7 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #a9e4f7 0%,#0fb4e7 100%); /* IE10+ */
background: linear-gradient(top,  #a9e4f7 0%,#0fb4e7 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a9e4f7', endColorstr='#0fb4e7',GradientType=0 ); /* IE6-9 */
height:100px;
}

/* CLASES GENERALES */

.interior{
   width: 960px;
   margin: 0 auto;
}

.clearfix{
   clear: both;
}


/* CABECERA */

#nombres{
   position: relative;
   height:100px;
}

#nombres h1{
   line-height: 60px;
}

#nombres small{
   position: absolute;
   top: 20px;
   right: 0;
   font-family: verdana;
   font-size: 20px;
}

/* MENU */
#menu_principal{
   height: 50px;
}
#menu_principal li{
   float: left;
   line-height: 50px;
   padding-right: 50px;
   
}

#menu_principal li a{
   color: white;
   font-family: myriad pro;
   
}

#menu_principal li a:hover{
   border-bottom: 3px solid #666;
   font-size: 15px;
}


/* CONTENIDO_PRINCIPAL */

#contenido_principal{
   width: 500px;
   float: left;
   margin-top: 25px;
}

#barra_lateral{
   width: 460;
   float:right;
}

#footer{
   clear:both;   
}

Etiquetas: blanco, chrome, color, contenido, espacio, hover, imagenes, fondo
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:16.