Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to set current page active when menu in php file

Active Menu item is simple when we go with HTML but when we develop website through PHP, its little bit difficult. As in HTML we can simply call Active class for each menu label, here we need to write some dynamic CSS, here our hope/clue is URL . Based on URL we can do some magic. Lets assume we have class called "current" and we want this class active based on page we areee...


Code is simple look how i convert,







Dynamic CSS Menu reading page URL




         
  • Home


  •          
  • About us


  •          
  • Services


  •          
  • Security Doors


  •          

             
  • Gallery


  •          
  • Contact Us


  •        


    Now you can call your menu  on any php page.


    This post first appeared on Php Source Codes, please read the originial post: here

    Share the post

    How to set current page active when menu in php file

    ×

    Subscribe to Php Source Codes

    Get updates delivered right to your inbox!

    Thank you for your subscription

    ×