#36: Current Nav Highlighting: Using PHP to Set the Body ID

Css tutorial

#36: Current Nav Highlighting: Using PHP to Set the Body ID

watch that tutorial on css-tricks.com

Description

One of the more efficient ways to handle current navigation highlighting is to give each of your navigation items a unique class name. Then give each page a unique ID on the body element. Then CSS can control what each navigation item looks like based on that body ID. But what if you are using a CMS like WordPress which includes that body tag as part of a template? In this case, we can use PHP to look at the URI of the page and create the ID based on that. Nifty trick!

Keywords relative to the tutorial

css current highlighting using

Comments

No comment at this time. Be the first !

Add comment :

Pseudo *

Website

Message *


* Required fields.

 

All rights reserved © 2012 - about - contact us - legals
Our partners : Weecast.fr - Adaero.fr - Video-tuts.fr

Video-tuts.fr // improve and share your skills is a free directory of video tutorials. Every tutorials are carrefuly examined by a moderator.