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

Sergio Cruz
Sergio Cruz
15,550 Points

a:link works fine for "fake" links but wont style actual link with .html extension

<body>
<header class = "title"> <h1>Amibar</h1> <span><a href="#more">Alcohol Delivery App</a></span> </header>

<div class= "primary-content">
  <div class = "left-column">
    <p><a href="promos.html">Promos</a></p>
    <p><a href="memes.html">Memes</a></p>    
  </div>

Css part:

a:link { color: rgb(255, 169, 73); text-decoration: none; }

a:hover { color: rgba(255, 169, 73, .4); }

a:active { color: lightcoral; }

The Promos and Memes links are still shown with the default purple color. The Alcohol Delivery App link does appear orange as it should. Whats going on?

3 Answers

highlandcow
highlandcow
7,352 Points

I can't reproduce the issue you're observing with the given CSS and HTML. Is that all of your code?

You could always try defining a lower-level rule. For example:

.primary-content .left-column p a:link { color: rgb(255, 169, 73); text-decoration: none; }

looks like your missing your second CLOSING div tag. maybe that causing a problem.

Kimberly Hopkins
Kimberly Hopkins
100 Points

The rest is just another div with two more p tags with fake links too. Im trying to avoid using a different rule for it. I think it should work with the a:link but I can't pinpoint why it isn't