html - One line of text refuses to change color -
i doing project recreating google homepage in html/css , part came out fine except reason can't text within "sign up" alter color
.
<div id="contents"> <div id="navbar"> <ul> <li id="signin"><a href="https://accounts...">sign in</a></li>
i phone call out in css these lines.
#navbar { text-decoration: none; width: 200px; color: #4c4c4c; font-size: 14px; } #signin { background-color: blue; font-weight: 800; color: #ffffff !important; padding: 7px 12px; }
i added !important
thinking alter didn't thing. note of code there other items on nav bar same right color. got background-color
alter not actual text color
.
as other commenters alluding to, need separate css rule (#signin a
) nested anchor tag.
class="snippet-code-css lang-css prettyprint-override">#navbar { text-decoration: none; width: 200px; color: #4c4c4c; font-size: 14px; } #signin { background-color: blue; font-weight: 800; color: #ffffff; padding: 7px 12px; } #signin { color: #ffffff; }
class="snippet-code-html lang-html prettyprint-override"><div id="contents"> <div id="navbar"> <ul> <li id="signin"><a href="https://accounts...">sign in</a></li> </ul> </div> </div>
html css colors
No comments:
Post a Comment