I have
body
{
color: #6969开发者_开发知识库69;
}
and
th.somelist
{
font-weight: bold;
color: red;
}
but the color property of body is not overridden. How come, and how can I make it override the body selector?
Edit:
I also have
table.somelist
{
padding: 10px;
background-color: green;
border-radius: 15px;
}
and the code is
<table class="somelist">
<tr>
<th class="somelist">
Top 10
</th>
</tr>
<tr>
<td> 1. </td>
</tr>
</table>
The th text is bold but #696969 and not red.
<html><head><title>test</title>
<style>
body
{
color: #696969;
}
th.somelist
{
font-weight: bold;
color: red;
}
</style>
</head>
<body>
testing...
<table><tr><th class="somelist">should be red</th></tr>
<tr><th>should not be red</th></tr>
</table>
</body>
</html>
works on Chrome and Firefox.
精彩评论