by jrod11
3 replies
  • WEB DESIGN
  • |
I have the following code that I created a CSS class for the "active" page in the navigation. This way when you go to each page, it will show where you are.

What php code can i use so that if it is the active page, it will use the "current_page_item" class?

Here is my code:
PHP Code:
<li class="current_page_item"><a href="index.php"><span>Home</span></a></li
#navigation #php
  • Profile picture of the author Michael W
    You use CSS for this.

    Depending on your nav div it will be.

    #navdivId.current_page_item { }
    Signature
    BBRiches - $2,884.41 in 4 weeks!
    (Excel Revenue Forecasts Spreadsheets & More)
    > PM for more details (Limited spots) <

    Realistic Earnings, No Bullsh*t
    {{ DiscussionBoard.errors[2171342].message }}
  • Profile picture of the author jrod11
    Thanks for your help! Not exactly sure where to start though. I used a php header file that has my navigation in it. what do i put in the main page file to tell the nav what to display?
    {{ DiscussionBoard.errors[2171362].message }}
  • Profile picture of the author jrod11
    I think i might have found it: w w w. alistapart.com/articles/keepingcurrent/
    {{ DiscussionBoard.errors[2171374].message }}

Trending Topics