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

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)