[pmwiki-devel] centering a div
The Editor
editor at fast.st
Sun May 20 13:27:27 CDT 2007
On 5/20/07, Hans <design5 at softflow.co.uk> wrote:
> Sunday, May 20, 2007, 6:02:08 PM, The wrote:
>
> > I have a div in my skin called wrapper that I want centered on my page.
>
> > I tried #wrapper { position: center; } but it doesn't seem to work.
>
> > Did I miss something?
>
> Try the following method, explained here:
> http://www.communitymx.com/content/article.cfm?cid=A8BBA&print=true
>
> The HTML:
> <body>
> <div class="wrapper">contents of page</div>
> </body>
>
> The CSS:
> body {
> text-align: center;
> min-width: 770px; /* Use this, or */
> }
>
> div.wrapper {
> text-align: left;
> margin-left: auto;
> margin-right: auto;
> border: 1px solid white; /* this. Both are not necessary */
> }
>
>
> Hans
Thank you much Hans, worked like a charm!
Cheers
Dan
More information about the pmwiki-devel
mailing list