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 Build a Simple Website Styling Content Fonts and Colors

Alfonso Farache
Alfonso Farache
1,853 Points

I don´t understand the reason why the links don´t change their color

Why don´t the lines under the links disappear and why don´t they become green?

a {
    color: #4FB69F;
    text-decoration: none;
}

Thank you!!!

9 Answers

Nachiket Kumar
Nachiket Kumar
3,590 Points

Alfonso Farache, you can go to codepen.io and just click 'New Pen'. Then paste in (or write) some HTML and CSS (and JS if you want) to replicate the problem so we can all see what code you are writing. Save it and then share the link here.

That is the best way for anyone to help you.

In any case, your problem is not the CSS rules you have written, which are fine.

I made a little pen to show you that they work. We'll need to see the rest of your HTML/CSS to help.

Joseph Marcus
Joseph Marcus
11,069 Points

Are you sure you saved the css and refreshed the html page?

Alfonso Farache
Alfonso Farache
1,853 Points

Yes I´ve saved in all the possible ways and it doesn´t change

Nachiket Kumar
Nachiket Kumar
3,590 Points

Could you share your code via codepen? Then we can see what is going on. Also, technically, this should be tagged with CSS, not HTML.

Alfonso Farache
Alfonso Farache
1,853 Points

yeah I am sorry about tagging it with HTML I didn´t take too much notice about that.

how do I share it with codepen?

I m sorry I am new at this and there are so many things I don´t get to understand...

Thank you very much Nachiket for your help!

Is there other CSS you've written that is working in this file? Or is the link styling you've shown above the only CSS there is? The reason I ask is that maybe the link between the CSS and HTML is the problem.

Yes, this could be true. If he is using an external stylesheet, would be good if he can recheck his link ref head code. Sometimes some browsers use a cache version, another option is to delete all recent history and reload the browser. This happens to me often. I usually have to do a lot of clear history to see the updated css.

So the link could be stuck in it's 'visited' state until the browser is cleared and restarted?

Not really, i think it will eventually display the correct css code within a few hours at most, but as for people like me and you who refresh constantly to see our code change, we may at times have to clear the history to get an instantaneous update.

Also, there are times when i did refresh and got no luck. I guess sometimes the webhost server maybe a little slow in getting up to date - just my assumption. I'd recommend testing in couple browsers as well, have notice sometimes there will be no change in chrome while firefox will show it, although eventually, chrome will get the updated version. I have no idea why it happens, but anyone will tell you that at times, browsers do fail to load code.

That's why when implementing a background image, they teach to also set a background color that can blend with the site just incase the background image does not load. Sometimes facebook looks distorted if your internet connection is slow as all the elements cannot load.

Alfonso Farache
Alfonso Farache
1,853 Points

Thank you very very much for all your help and attention.

After so many hours checking all my staff I discovered it was an ubication problem the reason why some css code was not working. The thing I don´t get to undertand is why some of the css was working and some wasn´t, but nothing too important now that is solved.

Now, the only thing that concerns me is why the border-radius doesn´t work and why the h1 is blue instead of yellow... http://codepen.io/anon/pen/urfgG

Thanks a lot to everyone: Nachiket,Ben and Jeny for helping me. You´re awesome!

Hi Alfonso, in your CSS for .btn you need to close the 'margin' property above border-radius with a semi-colon and you will need to declare a 'color' property for h1. That should give you the results your after. Hope this helps.