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

HTML

Ian Carroll
Ian Carroll
1,901 Points

Button Text Turns White When Hovered

I'm redesigning the website for my company without using Bootstrap, and it's going well. However, in my navbar, when I hover over Contact Us, and any other nav li with a a tag in it, the text is white. How can I fix this?

Code: https://gist.github.com/snapapps/71846649102073f4434a Live Demo: http://codepen.io/snapapps/pen/szoaK

4 Answers

Try to add this:

.navbar li a:hover { color: #E04E32; }

Ian Carroll
Ian Carroll
1,901 Points

That worked, however as you'll see at http://codepen.io/snapapps/pen/szoaK, there's a weird space in the button.

You could try to remove the padding-left in the class .navbar a

.navbar a { display: inline; font-family: 'Inder'; //padding-left: 0; -> remove this line color: white; }

Ian Carroll
Ian Carroll
1,901 Points

Thanks! That fixed it.