Ver Mensaje Individual
  #276 (permalink)  
Antiguo 28/07/2008, 09:36
Avatar de derkenuke
derkenuke
Colaborador
 
Fecha de Ingreso: octubre-2003
Ubicación: self.location.href
Mensajes: 2.665
Antigüedad: 20 años, 6 meses
Puntos: 45
Respuesta: Trivia: Conceptos CSS

Tenemos este HTML:

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" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1" />
<title>Página nueva</title>
<link href="estilo.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	@import "estilo2.css";
	#capa { background-color: olive; }
</style>
</head>

<body>

<div id="capa" style="background: green;">aa</div>


</body>
</html> 
Y la hoja de estilos estilo.css tiene este contenido:
Código:
#capa { background-color: red !important; }
La hoja de estilos importada estilo2.css tiene este contenido:
Código:
#capa { background-color: blue; }
¿Prevalece el !important para todas las demás instrucciones, luego se ve roja la capa? ¿Se sobrescribe la propiedad backgorund-color al último valor?
__________________
- Haz preguntas inteligentes, y obtendrás más y mejores respuestas.
- Antes de postearlo Inténtalo y Búscalo.
- Escribe correctamente tus mensajes.