Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Targeting my footer links in WordPress but result is funny

I have a navigation menu in my site's footer (http://raccoonbox.com/sitedata/). I would like to change those links to gray color (a:link) but something funny is happening.

#menu-footer-menu,
#menu-main-menu-in-footer {
  list-style: none;
  text-decoration: none;
  display: block;
  text-align: center;
}

#menu-footer-menu a:link,
#menu-main-menu-in-footer a:link {
  color: #c6c5c5 !important;
}

This code that I have in my style.css only affects half of the links. In PC Firefox none of the links is gray, in iPhone Safari the last link is gray, in PC Chrome all but two middle links are gray.

What is happening?

1 Answer

Hi Konstantin,

It looks as though your visited links are not retaining the colour. If you have styled this with a:link (as an example), try using a:visited with the same styles or removing the :link altogether, e.g.

#menu-footer-menu a:link,
#menu-footer-menu a:visited

or

#menu-footer-menu a

Hope that helps.

-Rich

Thank you! <3

No problem. Glad you got it sorted.