Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/12/2009, 21:00
devnieL
 
Fecha de Ingreso: noviembre-2009
Ubicación: 127.0.0.1
Mensajes: 31
Antigüedad: 14 años, 5 meses
Puntos: 1
Respuesta: fondo de un div

Código:
@charset "utf-8";
/* CSS Document */
* {
	margin:0;
	padding:0;
	border:0;
	outline:0;
}

html,body {
	width:100%;
	background:#DFEFF9;
}
#caja {
	height:50px;
	background-color:#000;
}

#contenedor {
	width:1000px;
	margin:-50px auto 0 auto;
}

#cabecera {
	height:50px;
	background:#000;
	color:#FFF;
	}

.caja_izquierda {
	width:400px;
	font:12px tahoma;
	}
.caja_medio {
	width:350px;
	height:400px;
	backgroun:#996;
	font:12px tahoma;
}
#menu {
	text-align:center;
	font:10px tahoma;
	width:1000px;
	background:#06F;
	height:25px; /* <------------------------------------------------------------ */
	}
#menu ul {
	list-style-type:none;
	}
#menu ul li.nivel1 {
	float:left;
	width:100px;
	height:25px;
}
#menu ul li a {
	line-height:25px;
	display:block;
	text-decoration:none;
	color:#fff;
	background-color:#399;
	position:relative;
	height:25px;
}
#menu ul li:hover{
	position:relative;
}
#menu ul li a:hover, #menu ul li:hover a.nivel1 {
	background-color:#6cc;
	color:#000;
	position:relative;
}
#menu ul li a.nivel1 {
	display:block;
	position:relative;
}
#menu ul li ul {
	display:none; /* acá se ocultan los subniveles */ 
}
#menu ul li a:hover ul, #menu ul li:hover ul {
	display:block;
	position:absolute;
	left:0;
}
#menu ul li ul a {
	width:100px;
	border-top-color: #000;
}
#menu ul li ul li a:hover {
	border-top-color: #000;
	position: relative;
}
Gracias por tu respuesta. Este el código y estás en lo cierto, hay elementos dentro del menú que tienen la propiedad float, en tal caso siempre se ha de poner una altura para poder "colorear" el fondo ?