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 trialNatalia P.
353 PointsSelectors and changing properties.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Natalia Peczerski | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Natalia Peczerski</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html" class="selected">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section>
<ul>
<li>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
<li>
<a href="img/numbers-02[1].jpg">
<img src="img/numbers-02[1].jpg" alt="">
<p>Playing with blending modes in Photoshop.</p>
</a>
</li>
<li>
<a href="img/numbers-06[1].jpg">
<img src="img/numbers-06[1].jpg" alt="">
<p>Trying to create and 80's style of glows.</p>
</a>
</li>
<li>
<a href="img/numbers-09[1].jpg">
<img src="img/numbers-09[1].jpg" alt="">
<p>Drips created used Photoshop brushes.</p>
</a>
</li>
<li>
<a href="img/numbers-12[1].jpg">
<img src="img/numbers-12[1].jpg" alt="">
<p>Creating shapes using repitition.</p>
</a>
</li>
</ul>
</section>
<footer>
<a href="http://twitter.com"><img src="img/twitter-wrap[1].png" alt="Twitter Logo"></a>
<a href="http://facebook.com"><img src="img/facebook-wrap[1].png" alt="Facebook Logo"></a>
<p>© 2014 Copywrite.</p>
</footer>
</div>
</body>
</html>
Here is my question: in CSS the instructor, Nick Pettit, explains how to change text color. I am a bit confused on the selectors involved. For example, he wants to change the color of the text in the body element. So, he inputs this in CSS:
body { color: #888 }
That only ends up changing the color of the footer to grey. It does not change the color of the paragraphs. I do not understand why it would not change the color of ALL the paragraphs. It only changed the color of the paragraph that is not inside of an anchor element. The other paragraph anchors the relative reference source image (and then, this source image also anchors to the original source image). All other paragraphs are like this too including the one in the navigation. I guess I've answered my own question, that anchor elements need a selector that specifies them specifically, not general ones. I don't know, in any event may someone expand on this please? Thanks from Madison, WI. USA.
Pol Martin
8,200 PointsKen Alger seems related to her latest question: https://teamtreehouse.com/forum/changing-color-of-text-in-html-and-selectors
1 Answer
Natalia P.
353 PointsKen and Pol, I'm so sorry yes the two questions are related. I did not know how to attach the code to my previous question, which is why I posted almost the same question again. I will try to attach this code to that question now, so, for anyone reading this who wants to help me out please go to the link which Pol included in his comment above. Thank you!
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherEdited for markup.
Natalia;
What is/are your question(s)?
Ken