Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Customizing Colors and Fonts Use Classes in CSS

Jamie Wyton
Jamie Wyton
3,011 Points

Color.....

Thinking that I might have done something wrong I reviewed the video and it seems that Nicks web page has done the same. If the body color has changed to grey then surely that includes the text under every picture as well as the footer?

3 Answers

The text under the pictures will continue to be the green color they are because they are anchor tags and we defined them to be

a {
  color: #6ab47b;
}

on line 17 of the main.css file.

Colors tend to be inherited by the children of elements that are set initially i.e.

body {
    background-color: grey;
    color: blue;
}

will, in almost all cases, set the background-color and color of all child elements in body to be those colors as well. Usually, if the expected colors do not exist, it is the result of the color being reset or changed again later in the CSS or in a way that takes higher precedence. Without seeing your code, it's hard to say why you might be experiencing a color issue.

Jamie Wyton
Jamie Wyton
3,011 Points

As far as I'm aware its the same as what is followed in the video:

a { text-decoration: none; }

wrapper {

max-width: 940px; margin: 0 auto; padding: 0 5%; }

logo {

text-align: center; margin: 0; }

a { color: #6ab47b; }

header { background: #6ab47b; border-color: #599a68; }

h1, h2 { color: #fff; }

nav { background: #599a68; }

nav a, nav a:visited { color: #fff; }

nav a.selected, nav a:hover { color: #32673f; }

body { background-color: #fff; color: #999; }