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 Simple PHP Application Creating the Menu and Footer Adding Active States to the Navigation

Armando Ruiz
Armando Ruiz
8,099 Points

I followed all the steps and the result is: both menus, contact and shirt are underline?

I followed all the steps and the result is: both menus, contact and shirt are underline, also the background for the shirt menu link is white?

3 Answers

I found that you need to add the $section variable to index.php as well but with a value of $section = " "; or an empty string. For some reason when on the home page I was getting a big white blob in my nav.

It took me a minute to figure this out but finally I realized that prior to the introduction of the variable everything was fine and that only the home page was lacking it. Since the homepage would never require the condition of "on" I gave the variable no value and this resolve my issue.

I hope this helps others who might be confused by a busted nav after following the instructions to the letter.

Thanks a lot, that'll do the trick

Shane Meikle
Shane Meikle
13,188 Points

You posted what the result is, but didn't post what result you are looking for. Also, posting the code would be helpful :)

Armando Ruiz
Armando Ruiz
8,099 Points

You are right! Sorry, I fixed it already Thanks