New module: Views Two Column Table

For a project I've been working on recently, I needed the ability to have a two column table layout in Views. The idea was to place the field label in the first column, and the field data in the second. I had tried achieving the same layout using the unformatted default layout with some CSS, but was unable to get the label and field data to line up correctly, and so eventually wrote a views plugin to achieve the effect using tables.

The screenshot below shows what the final result looks like.

 

Example layout

Project page: http://drupal.org/project/views_two_column_table
Drupal version: 6.x

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Did you try A List Apart's technique?

A List Apart described a while back[1] how to float SPANs within DIVs for aligned labels within a form. Did you try this technique before resorting to tables?

[1] http://www.alistapart.com/articles/practicalcss/

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <p> <a> <em> <strong> <cite> <ul> <ol> <li> <dl> <dt> <dd> <img> <b> <i> <h2> <h3> <pre> <br> <font> <hr> <s> <strike> <code> <span> <blockquote> <acronym> <del> <ins> <table> <th> <tbody> <tr> <td> <div>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options