[thelist] Centering a div with CSS
David Dorward
evolt at david.us-lot.org
Thu Jun 13 18:35:01 CDT 2002
On Thu, 13 Jun 2002 18:23:43 -0600
"Eduardo Dominguez" <lalo at teligens.com> wrote:
> I want to create a div that will hold all the content of a
> small site and I want this 580px of width but that its
> always centered horizantally.
>
> Already tried lots of things, like the float
> property, using percentages with "left" and "right".
> But I guess my newbieness to CSS is blinding me :)
div.foo {
width: 580px;
margin-left: auto;
margin-right: auto;
}
--
David Dorward http://david.us-lot.org/
HTML email is a bit like using coloured paper and glitter ink on a CV.
More information about the thelist
mailing list