I have the following HTML
<div class = "left">
<div id = "links">
<a href = "none" style = "text-decoration: none"><b>About</b></a>
<br>
<a href = "none" style = "text-decoration: none"><b>Principals</b></a>
<br>
<a href = "none" style = "text-decoration: none"><b>Contact</b></a>
<br>
</div>
</div>
and CSS
.left {
position: fixed;
top: 0px;
left: 0px;
width: 30%;
height: 100%;
background-color: #8EE5EE;
color: #000000;
}
#links {
position: relative;
top: 40%;
text-align: right;
font-family: "Verdana", "Arial Black", sans-serif;
font-size: 25px;
color: #000000;
}
The color of my links should be black, but they are appearing as dark blue. What’s wrong with this code?
Thanks!
The problem you’re having is that
aelements have a default style which doesn’t inherit the color from the parent element. To force the inheritance of thecolorproperty: