Book Image

Drupal Multimedia

Book Image

Drupal Multimedia

Overview of this book

Table of Contents (16 chapters)

Styling a View


In the last chapter you probably noticed that although we controlled what content was the output, its display was often less than desirable. This did not escape the attention of our friends at the Dead Presidents Glee Society. They like their gallery, but would rather see the thumbnails of their Presidents ordered horizontally, rather than vertically, with nice boxes around each entry.

If you have the Presidential Gallery view created from the last chapter, then we'll begin modifying it. Otherwise, you should create either that content type and view, or a new content type with an image field (named Image), and a page view of the List View type displaying node titles and image fields.

Open (or create) the style.css file of your custom theme or subtheme for editing. At the bottom, enter the following CSS code:

.view-presidents .view-item-presidents {float: left;
margin: 0 5px 5px;
padding: 10px;
background: #eee;
border: 1px solid gray;
}

This will cause the presidential images...