πŸ€‘ Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! πŸš€start learning today!

🌟 Dreaming of a bright future? πŸŽ“ Ask about the Treehouse Scholarship program! πŸš€

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Aakash Srivastava
    Aakash Srivastava
    5,415 Points

    Adding active states to the Navigation

    Posted December 25, 2018 4:03am by Aakash Srivastava
    Aakash Srivastava
    5,415 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    0 Answers

  • Sean Flanagan
    Sean Flanagan
    33,236 Points

    Extra credit

    Posted September 14, 2018 7:59pm by Sean Flanagan
    Sean Flanagan
    33,236 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    2 Answers

  • naif alghamdi
    naif alghamdi
    212 Points

    underline doesn't work

    Posted September 11, 2018 8:37pm by naif alghamdi
    naif alghamdi
    212 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Henry Lin
    Henry Lin
    11,636 Points

    I am confused by the class on Help Please!

    Posted February 25, 2018 6:15am by Henry Lin
    Henry Lin
    11,636 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    2 Answers

  • Kevin Lothrop
    Kevin Lothrop
    2,276 Points

    Need Help The underline doesn't turn off.

    Posted January 19, 2018 11:43pm by Kevin Lothrop
    Kevin Lothrop
    2,276 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Kat Stacy
    Kat Stacy
    41,658 Points

    Parse error: syntax error, unexpected '}' in /home/treehouse/workspace/catalog.php on line 9

    Posted December 9, 2017 3:55pm by Kat Stacy
    Kat Stacy
    41,658 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Anthony Fowler
    Anthony Fowler
    6,749 Points

    My Code works as shown but I am wondering how or why echo " on" has this effect.

    Posted October 28, 2017 4:11am by Anthony Fowler
    Anthony Fowler
    6,749 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Jackline KInyanjui
    Jackline KInyanjui
    13,216 Points

    Adding an icon to an existing image sprite

    Posted October 2, 2017 10:18am by Jackline KInyanjui
    Jackline KInyanjui
    13,216 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Navdeep Sekhon
    Navdeep Sekhon
    1,616 Points

    HTTP Error 500

    Posted April 18, 2017 4:28am by Navdeep Sekhon
    Navdeep Sekhon
    1,616 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    0 Answers

  • jlampstack
    jlampstack
    23,932 Points

    $section

    Posted April 16, 2017 4:06pm by jlampstack
    jlampstack
    23,932 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    0 Answers

  • Akasha Fryman
    Akasha Fryman
    2,068 Points

    When placing PHP start and end code inside of CSS class quotation marks, I get a Parse error.

    Posted January 25, 2017 10:30pm by Akasha Fryman
    Akasha Fryman
    2,068 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • daniel steinberg
    daniel steinberg
    14,651 Points

    PHP not working correctly on "Build a basic php website", section "adding-active-states-to-the-navigation"

    Posted October 12, 2016 6:36pm by daniel steinberg
    daniel steinberg
    14,651 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    0 Answers

  • Dustin Mordica
    Dustin Mordica
    7,871 Points

    Please explain why the index page needs to have the $section = null;

    Posted September 23, 2016 4:04pm by Dustin Mordica
    Dustin Mordica
    7,871 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • hakan GΓΌlay
    hakan GΓΌlay
    8,489 Points

    I am Confused

    Posted June 23, 2016 8:14am by hakan GΓΌlay
    hakan GΓΌlay
    8,489 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Ammu Nair
    Ammu Nair
    9,100 Points

    Class 'on' not getting reflected. Active link not underlined.

    Posted June 12, 2016 2:40pm by Ammu Nair
    Ammu Nair
    9,100 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    2 Answers

  • Nikolay Komolov
    Nikolay Komolov
    23,033 Points

    Why, when omitting "$section=null", are all links underlined?

    Posted May 4, 2016 8:15pm by Nikolay Komolov
    Nikolay Komolov
    23,033 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Richard Hall
    Richard Hall
    9,139 Points

    Getting a weird alignment glitch

    Posted April 28, 2016 1:21am by Richard Hall
    Richard Hall
    9,139 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    2 Answers

  • mohammed abdi abdulahi warsame
    mohammed abdi abdulahi warsame
    4,926 Points

    why are we using (if) when we want to underline the elements? cant we just order it?

    Posted April 19, 2016 6:16pm by mohammed abdi abdulahi warsame
    mohammed abdi abdulahi warsame
    4,926 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    1 Answer

  • Martina Carrington
    PLUS
    Martina Carrington
    Courses Plus Student 15,807 Points

    I revived error message on header.php

    Posted March 21, 2016 2:03am by Martina Carrington
    Martina Carrington
    Courses Plus Student 15,807 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    2 Answers

  • 1v4n
    1v4n
    4,584 Points

    Page refresh at end of video

    Posted February 2, 2016 10:24pm by 1v4n
    1v4n
    4,584 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    5 Answers

  • Oliver Sewell
    Oliver Sewell
    16,425 Points

    why do we use a space before the on class

    Posted January 26, 2016 8:18pm by Oliver Sewell
    Oliver Sewell
    16,425 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Building a Media Library in PHP
    • Adding Active States to the Navigation

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.