Somehow the descendant selector overrides my .red_p class
. How do I avoid that? I don't want to set a class for each p
element.
HTML:
<html>
<head>
<style>
.red_p {
color: red;
}
#main p {
color: blue;
}
</style>
</head>
<body>
<div id="main">
<p>This should be blue.</p>
<p class="red_p">This should be red, but is blue.</p>
</div>
</body>
</html>