Re: using css for centering

by Al Sessions <al(at)oldforgefd.org>

 Date:  Mon, 03 Jun 2002 14:24:56 -0700
 To:  hwg-techniques(at)hwg.org
 In-Reply-To:  services
  todo: View Thread, Original
At 11:26 AM 6/3/2002 -0400, Nate Harel wrote:
>Hi all,
>
>I am trying to be a law abiding citizen and am working as much as I can 
>learning and using CSS.
>
>One of the things I am struggling with is how to center a design.

This is most definitely a pain in the ass. Relying on the box model is 
always an iffy proposition and tends to produce unpredictable results cross 
browser.

The biggest thing to remember is that CSS will center elements in relation 
to the parent element, so it's necessary to wrap the content div in a 
larger one. Then you can devote the remainder of your week to understanding 
all the good margin:auto business.

A few references that might help get you going;

SPECIFIC TO CENTERING
http://allmyfaqs.com/cgi-bin/wiki.pl?Center_with_CSS Specific to centering 
content with CSS.

http://www.bluerobot.com/web/css/center1.html Blue Robot centered layout, 
be sure to look at the rest of the site :)

http://www.evolt.org/article/Does_IE_6_Center_Your_Table_Content/17/15341/ 
Centering tables (strikes me as kinda redundant) with CSS.


CSS IN GENERAL
http://www.websitetips.com/css/index.shtml The motherload of CSS inks.

http://www.meyerweb.com/eric/css/ Eric Meyers work. When it comes to CSS, 
Eric is 'Da Man'.

http://www.alistapart.com/stories/practicalcss/ Mark Newhouse for A List 
Apart.

Good reading,

Al
al(at)oldforgefd.org

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA