Drupal Site Background Image Addition - dummies

Drupal Site Background Image Addition

By Lynn Beighley, Seamus Bellamy

You can add a background image to the Left and Right Sidebars of your Drupal site to spruce them up. For example, say you still want the text on top, but instead of gray, you want faint, diagonal pinstripes.

Follow these steps:

  1. Use FTP or your ISP’s file manager to copy your background image to your web server. Put it in your theme’s directory.

    This example will use a background image called stripes.gif. It was uploaded to the Drupal site under themes/drupalfordummies.

  2. Open a copy of style.css in a text editor.

  3. Locate a section of code that deals with the sidebars, such as:

    #sidebar-first, #sidebar-second {
      width: 16em;
      padding: 1em;
      margin-right: -18em; /* LTR */
      background-color: #ddd;
  4. Add the following line inside the curly brackets:

  5. Save and upload your file.

    Now when you look at the site, the stripes show up on the sidebars.

    Unfortunately, the bottom parts of the sidebars don’t have the background. Only the portions of the sidebars with actual content blocks are filled in. You need one more line of code. Coming right up.

  6. In the body section of style.css, add the same line of code:

  7. Save and upload your file.

    Your background is now visible all the way to the bottom of the page.