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 How to Make a Website Debugging HTML and CSS Problems How to Fix Problems with Code

Chris Cuaresma-Primm
Chris Cuaresma-Primm
2,185 Points

Wrong color font

On my about page, I have a sentence that reads "If you'd like to follow me on Twitter, my username is @Kris_Cuaresma_P." However, my twitter name colored white and therefore cannot be seen on our white background.

How do I fix this?

2 Answers

Isaac Asante
Isaac Asante
4,752 Points

Hi Chris, if your Twitter username is linked to Twitter, you may want to give your Twitter link a class to style it separately in your CSS file. For instance, you could set the class "twitter_username", then in your stylesheet, add this code:

a.twitter_username {
color: #000099; /* This color will appear as dark blue */
text-decoration: none; /* This will prevent your link from being automatically underlined */
}

FYI, it's very important you style your Twitter link directly in your stylesheet. If you style the paragraph containing that link, the link itself will not be visually changed, since there will be a specificity problem. So you need to be specific and apply the styles directly to the link.

Hello Chris,

Font color is controlled by the color property. So to change the font color of your message, In CSS you must select the element that contains your message and set the color property to the value you want. For example:

p {
    color: green;
}

turns all p element text green.

or

p#myTwitterMsg {
    color:green;
}

which turns the p element with an id of myTwitterMsg green.

I hope this helps.

-Agapito