Add custom CSS classes to <body> tag of your theme. /** * Implements template_preprocess_html(). */ function YOUR_THEME_preprocess_html(&$vars) { $path = ‘your-drupal-page’; if (drupal_match_path($_GET[‘q’], $path) || drupal_match_path(drupal_get_path_alias($_GET[‘q’]), $path)) { $vars[‘classes_array’][] …
Month: October 2013
How to add First and Last CSS class to Drupal blocks
If you’re a themer looking to style blocks when its the first or last block in the region, use the following code snippet. /** * Returns a list of blocks. …