| Web Development >> PHP |
Current Nav Highlighting: Using PHP to Set the Body ID
| Language: | English | Quality: | High | Has Audio: | true | Source: | Other | Media: | Flash | Posted On: | 23 Jun 09 |
| 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! |
Tags: CSS Tricks, Screencast, CSS, Tricks, PHP, body, html, [SUGGEST A TAG]
|
Other dowloadable format of this video
|
Video in HQ Quicktime .M4V Format format
Resolution : 800x600 |
|
