登录 | 注册 | FAQ
Anonymous

css identification not working

+ 发表回复

3 篇帖子 分页: 1 / 1


css identification not working

mr code » 周三 4月 30, 2014 12:11 pm

my html code :-
<html>
<head>
<title>identification and grouping of elements</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>
<h1>grouping elements within a class</h1>
<h2>using css</h2>
<h3>with css</h3>

<p>action games</p>
<ul>
<li><a herf="ba.htm" class="action games">battlefield</a></li>
<li><a herf="co.htm" class="action games">cod</a></li>
<li><a herf="tc.htm" class="action games">tom clancy</a></li>
</ul>

<p>old games</p>
<ul>
<li><a herf="ro.htm" class="oldgames">roadrash</a></li>
<li><a herf="n2.htm" class="oldgames">nfs 2</a></li>
<li><a herf="wo.htm" class="oldgames">wolfstien</a></li>
</ul>
</body>
</html>

my css code:-
a {
color: blue;
}

a.actiongames {
color: #FFBB00;
}

a.oldgames {
color: #800000;
}

its not working pls help
头像

mr code

  • 帖子: 5
  • 注册: 周一 2月 17, 2014 11:02 am

Re: css identification not working

XainPro » 周五 5月 02, 2014 7:20 am

there is also a type inyour code

<a herf="tc.htm" class="action games">tom clancy</a>

do not add space in between action games
and try to remove a.actiongames from your css and only use .actiongames it would be easy to read your css code :)
头像

XainPro

  • 帖子: 3933
  • 注册: 周五 2月 17, 2012 8:10 pm

Re: css identification not working

mr code » 周五 5月 02, 2014 9:49 am

tnx guys it worked ...
头像

mr code

  • 帖子: 5
  • 注册: 周一 2月 17, 2014 11:02 am


+ 发表回复

分页: 1 / 1