[Seaside] Center Site without Table

dirk newbold dirkdirk at gmail.com
Tue Aug 28 11:09:50 UTC 2007


Yeah I'd tried that.

This is what didn't work (I'm testing in FireFox 2.0.0.6):

renderContentOn: html
    html div id: 'container'; with: [
        html div id: 'holdingPage'; with: [ ]].

style
    ^'
    body {
        text-align: center;
    }

    #container {
        float: left;
        margin-left: auto;
        margin-right: auto;
        width: 100% (or even: 1020px);
        border: 1px solid black;
    }

    #holdingPage {
        float: left;
        padding: 0px 0px 0px 0px;
        text-align: center;
        width: 980px;
        border: 1px solid black;
    }'


This is what worked:

renderContentOn: html
    html table align: 'center'; with: [ html tableRow: [ html tableData: [
        html div id: 'holdingPage'; with: [ ]]]]


style
    ^'
    #holdingPage {
        float: left;
        padding: 0px 0px 0px 0px;
        text-align: center;
        width: 980px;
        border: 1px solid black;
    }'

Cheers,

Dirk

On 8/28/07, Lukas Renggli <renggli at gmail.com> wrote:
>
> > > I'm trying to center all the pages of my site, I've had no luck with
> the
> > style sheets and the only way I've been able to achieve it is to place
> the
> > holding div block inside a table as per the following:
>
> Did you type 'css center page' into Google?
>
> This explanation seems to be quite nice:
>
>      http://www.maxdesign.com.au/presentation/center/
>
> Cheers,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070828/97837892/attachment.htm


More information about the seaside mailing list