Sent by jack fredricks on 27 January 2005 02:02
i was hoping someone could please shed some light on this problem. I
dont quite understand why one Selector is given more weight than
another.
#col-a div{border: 1px blue solid;} is listed before class
..main-content{border: 1px red solid;}. I was hoping the border would
be red, but it is blue.
TIA
jack
Code;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>zzz test</title>
<style>
body{margin:0;padding:0;}
#col-a {
float: right;
width: 100%;
border: 3px #E09296 solid; /* light reddy colour */
}
/* these 2 are the issue */
#col-a div{
border: 1px blue solid;
}
..main-content{
border:solid 10px red;
background: #F0F5FA;
}
</style>
</head>
<body>
<div id="col-a">
<div class="main-content">
<h1 class="title">why is my border blue, not red?</h1>
</div>
</div>
</body>
</html>
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/