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 Basics (2014) Basic Selectors Pseudo-Classes

Pseudo Class

I have <a> links on my html

<header id="top" class= "home"> <span class="title">She loves her current home and parents, but as she grows so does her needs</span> <h1>A New Home for Moosie</h1> <img src="img/new home.jpg">

        <nav>
            <ul>
                <li><a href="index.html">Home</a></li>
                <li><a href="#about">About</a></li>
                <li><a href="#articles">Articles</a></li>
                <li><a href="#contact">Contact</a></li>
            </ul>
        </nav>
    </header>

When I try to apply psedo-class it doesn't work

a:link { color: green;

I don't know whats going on, help please.

1 Answer

Heidi Fryzell
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree seal-36
Heidi Fryzell
Front End Web Development Treehouse Moderator 25,178 Points

HI Ubo,

I can't see all your code, but it might be that you don't have a closing bracket after your css selector.

Here is a helpful article about the link selectors: https://www.w3schools.com/css/css_link.asp

If you are going to use the various states, (link, visited, hover, active), you nee to apply them in a specific order. See the link above.

Happy Coding! Heidi