Marking active page on the menu


  • May I know how this example website marks the active page on the left hand menu bar? I looked at the html and css and I cannot understand how the active menu is identified in the html code of pages.
  • What possible alternatives do we have? use a slightly different style for the desired menu item in the html code of each page?

I am using header/footer files in PHP, so in this method I should put a condition in menu items in my header or footer to render the item with a different style.


Each page has an id on the body which indicates which menu option is being used.

<body id=“referenzen”>

This dicates the styling rules for the anchors tags <a> in the list item <li> of the menu.