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.

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.