Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNhai Duong
3,711 PointsHow can I set the color of paragraphs to black using a hexadecimal value?
I code like this:
a{ color:#000; }
to change the color of paragraph to black but it can't work, so Can you tell me how I can fix it?
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
a{
color:#000000;
}
header{
background:#6ab47b;
border-color:#599a68;
}
h1,h2{
color:#fff;
}
nav{
background:#000000;
}
nav a{
color:#000000;
}
Nhai Duong
3,711 PointsOh thanks very much :)
2 Answers
efewafewa
21,825 PointsYou want
p { color: black }
a stands for anchor (links)
Warren Leyes
Front End Web Development Techdegree Graduate 31,808 Pointsthe question would be what are you trying to do? since I see you have multiple anchor declarations including text decoration, makes me wonder if you are actually trying to override the link colors? if so then you need to target using :link, :hover :visited and :active pseudo classes.
jason chan
31,009 Pointsjason chan
31,009 Pointsp{ color:#000; }
paragraph is p
please refer to documention on paragraph css.
http://www.w3schools.com/css/tryit.asp?filename=trycss_text-indent