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.

PHP Build a Basic PHP Website Building a Media Library in PHP Adding Active States to the Navigation

Should have explained what echo "on" is actually doing. What does it mean? Why does echo "on" underline the nav links?

How is echo "on" underlining the anchor tags? Is it a part of css or what is actually happening?

Jordan Howlett
Jordan Howlett
3,369 Points

Since we're in PHP, we are learning how to use PHP to add style. An easier way to do this IMO is to add a hover state on the elements.

1 Answer

Jordan Howlett
Jordan Howlett
3,369 Points

Hi! In the php tags added to the class attribute "echo" the "on" class inside of the quotes. .header .nav li.on a {text-decoration:underline;} is found inside the styles.css file. Its a dynamic way to add style! B)