Community Documentation

Making your content look "fixed width" yet be fluid

Last updated August 26, 2009. Created by NancyDru on March 3, 2007.
Edited by ronald_istos. Log in to edit this page.

Some people don't want their site to use the full width of the screen, but this can cause problem for users who aren't using a full sized window. This tip "shrinks" the content area, yet remains fluid, so it works better with smaller windows. It does not change the header and footer size, so they still extend across the full width.

#content {margin-left:10%; margin-right:10%;}

Note, this also moves the side bars in. You will have "white space" (actually, your body background color) on both sides.

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.
nobody click here