Theming table views generated by the views.module using your style sheet (CSS)
description
The following snippets illustrate how to to theme the table views output from the views.module using your style sheet.
When the views.module outputs a table view, it wraps the table in a DIV which has a class using the following naming convention:
<div class='view-content view-content-viewname'><table>
Where viewname is the unique identifier of the view or the name you gave the view in the Basic Information options. Click on ADMINISTER -> VIEWS to see a list of your Existing Views. The unique identifier or viewname is in the first column.
Method 1 of 2 - theming all table views using your style sheet.
The snippet below, illustrates how to theme a specific table view. Paste this into your style sheet in your theme folder and change the viewname to suit.
.view-content table{ width:90%; background-color: red; border:3px; padding: 6px;}Method 2 of 2 - Theme a specific table view using your style sheet (.CSS)
The snippet below, illustrates how to theme a specific table view. Paste this into your style sheet in your theme folder and change the viewname to suit.
.view-content-viewname table{ width:90%; background-color: red; border:3px; padding: 6px;}Notes
- Please also note the following handbook page: Theming table views generated by the views.module using template.php
- The above snippets are only for use with the views.module.
