[thelist] Can't Center Div in FireFox

Matt Warden mwarden at gmail.com
Mon Feb 20 22:37:12 CST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rachell Coe wrote:
> Hi!  I can't seem to center my wrapper div on the page in Firefox (it works
> fine in IE).
> 
> I have the body tag set to center, and all my info is in the wrapper div tag
> -- why is it not working in Firefox?  The page is at
> http://www.4thegrapes.com/new.htm.

Hi Rachell,

I think it's probably not working in most other browsers as well.

Change this:

margin: 0px;

to this:

margin: 0 auto;

That will cause the div to have an auto left and right margin, which, in
combo with your width, will cause the div to center.

- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD+pj4rI3LObhzHRMRAs0dAJ9sYuqDNJ57lRumNvKvHwDhOpylTACgsB3E
FAaN6xilZ6X4SQ6DeCjdmZk=
=U2h/
-----END PGP SIGNATURE-----



More information about the thelist mailing list