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 trial

CSS

CSS: Need Help With Font Color Change

I am working on a personal project along with learning the Web Dev track. I am running into some layout issues and could really use some help.

Desired Layout Template: http://dribbble.com/shots/1183859-Something-New?list=searches&tag=website

My Code Via CodePen: http://cdpn.io/boscL

The code should be very simple, I know but for some reason I am missing something here and have become stuck. In the white margin I would like to make the text black but cannot figure out how to alter the font color in CSS to make it happen without changing all of the <p> elements

3 Answers

For the text colors you have set every hl1, hl2 and p to be white. You can avoid this by selection only certain elements within other elements.

e.g. only hl1, hl2 and p within an element with the class of "logo".

.logo h1, 
.logo h2,
.logo p {
    color: white;
}

The CSS could use some DRY-ing out

Thanks for your help! This set everything straight :) James Barnett I will looking into "DRY-ing Out" the CSS code and implement it.