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 trialjared garcia
1,295 PointsShould 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?
1 Answer
Jordan Howlett
4,377 PointsHi!
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)
Jordan Howlett
4,377 PointsJordan Howlett
4,377 PointsSince 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.