Community Documentation

HOWTO: Make the user list page compact (two or three columns, by css only)

Last updated August 27, 2009. Created by hiweed on October 20, 2006.
Edited by ronald_istos, add1sun. Log in to edit this page.

Hi there,

If you just want to change the layout to two/three columns, you no need to care about the template.php or profile_listing.tpl.php files. Just add this to your style.css file in your theme :

#profile .profile {
  width: 45%;
  margin-right: 10px;
  float: left;
  clear: none;
  margin-bottom: 0px;
  _word-wrap: break-word;
  border: 1px solid #7F98A7;
  margin-bottom: 1em;
  _position: relative; /* avoid IE peekaboo bug */
}

Note:
  • The "width: 45%", "clear: none" and "float: left" settings make it from one column to two
  • Set width to 30% to get three columns
  • Don't forget to remove the conflict profile css settings from the drupal/themes/your_theme_folder/style.css file first, especially the "clear: both" setting

About this page

Drupal version
Drupal 5.x
Audience
Themers

Theming Guide

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.