how to
Knowing Your Body and Practicing Safe CSS
This is a quick trick I picked up to guarantee that any css changes you make only affect what you want.
There are different ways to identify the page you need to change. I tend to use url as it's always unique.
Here's how:
Locate the template.php file for the theme your working on and add something like this to the page_preprocess function
- function your_theme_preprocess_page(&$vars) {
- // Add a custom body class for specifc page
- if ($_REQUEST['q'] == 'example/page/new-body-class') {
- $vars['body_classes'] .= ' custom-body-class-name ';
- }
