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 trialPeter McDonald
2,725 Pointsi cant get the paragraphs to be the color black
how do i select paragraphs in css
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
h1, h2 {
color: #fff;
}
p {
color: #111;
}
3 Answers
Chase Marchione
155,055 Points111 wouldn't be pure black, although it looks like it to our eyes. Try the exactly black value:
p {
color: #000;
}
Additional explanation: With hex values, we specify amounts of red, green, and blue. 0s for each value reflect an absence of each, which makes black.
James Casavant
21,522 PointsIf you are trying to make the paragraph text black the code you supplied should be selecting it fine. If you are trying to make the background black use "background-color" instead of "color".
You also may be overriding your own code: Remember the cascading nature of css sheets - if you have another "p" selector after this one it may be overriding it. Along the same lines, check where your css file is declared in the HEAD element of your HTML (if you are using normalize.css make sure you are declaring it afterward, or the normalize.css will override any rules you may be making):
<meta charset="utf-8">
<title>Title</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/yourstyle.css">
Kanav Mahajan
497 Pointsmake sure you have the correct hex value