Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Panels: Add or Remove CSS Body Classes

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:04
    Now, let's shift gears.
  • 0:06
    In the following demonstration I will show you how to add and remove CSS classes for
  • 0:11
    the body tag using the Panels Console. I will also point out the other CSS-related settings
  • 0:17
    and the pros and cons of each one. To add a CSS class to my test page's
  • 0:22
    body tag, in the administrative menu I'll navigate to Structure, then Pages
  • 0:28
    and select my test page to edit. Under the variant "Panel"
  • 0:33
    I'll select General. And this is the general settings
  • 0:36
    about this variant. Under Add body CSS classes
  • 0:40
    I'll add my-custom-body-class.
  • 0:46
    If I wanted to add more than one class I would separate those classes with a space.
Loading ...

Panels: Add or Remove CSS Body Classes

Loading...

In this tutorial, I will show you how to add and remove CSS classes from the body tag using Panels. I will also point out the other CSS-related settings and the pros and cons of each one.

Downloads: 
Log in or sign up to download companion files.