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 text element white on hover?

Hi,

If you go to the site I'm working on :

http://avlsounddesign.com

I am trying to make the links 'Weddings' and 'Special Events' turn white when hovering over them... I can't seem to figure it out.

Thanks for anybody's help

2 Answers

Okay so first you need to select the a elements with their classes on :hover like this:

my_class a:hover{

}

Next you need to select the color property and set it to white, like this:

color: white;

In the end you should have this:

my_class a:hover{
   color: white;
}

Hope that helps.

Hi Brandon you need to be using css to style not styling it in your html and you are using two h1 as links there should only be one h1 on every-page. so if I was you I would make a

<a herf="#"> <h2 class="wedding"> </a>

.wedding{
    color: #000;
    font-size: 24px;
}

.wedding a:hover {
    color: #fff:
}


Hope that helps!