[thelist] Centering divs in CSS

Jamie Macdonald jam.list at sympatico.ca
Wed Nov 6 09:53:04 CST 2002


Try this (on a Mac, but fairly sure this works) - in addition to the
styles below, add:

body { text-align: center }

The only drawback is that you need to reset the text-alignment for all
of the divs themselves.

Jamie

On Wednesday, November 6, 2002, at 10:47 AM, Chris Evans wrote:

> I would like to center a div using CSS.  Using {margin-right: auto;
> margin-left: auto;} works in Mozilla, but not IE6.
>
> Any ideas?  I'd like it to be as simple as possible.
> --
> Chris Evans
> chris at fuseware.com
> http://www.fuseware.com
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list