CSS refuse to obey
Posted
by Frank
on Stack Overflow
See other posts from Stack Overflow
or by Frank
Published on 2010-03-26T22:33:51Z
Indexed on
2010/03/26
22:43 UTC
Read the original article
Hit count: 186
Hi, I'll make this short, I got this webpage :
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="Stylesheet" type="text/css" href="css/style.css" />
<link rel="Stylesheet" type="text/css" href="css/nav.css" />
</head>
<body>
<div id="header">
<ul id="navList">
<li><a href="#" id="navActive">foo</a></li>
<li><a href="#">bar</a></li>
</ul>
</div>
</body>
</html>
With this CSS
style.css
body
{
padding:0;
margin:0;
background-color:#000000;
background-repeat:no-repeat;
background-image:url('../img/bg.jpg');
}
nav.css
#navList
{
padding:0;
margin:0;
background-image:url('../img/menu.png');
list-style-type:none;
padding:12px 150px;
}
#navList li
{
display:inline;
}
#navList li a
{
color:#bfbfbf;
padding:14px 25px;
text-decoration:none;
}
#navList li a:hover
{
color:#000000;
background-color:#bfbfbf;
text-decoration:none;
}
#navActive
{
color:#000000;
background-color:#bfbfbf;
}
It looks like the CSS from the navActive id is never being applied... Could someone tell me why and/or suggest me a way to correct this.
Thanks.
© Stack Overflow or respective owner