rubik
rubik

Reputation: 9104

Set a page margins

I have this stylesheet, but the right and left margins are too large (about 5 cm), I don't know how to reduce them. I'd like to have 3 cm right and left.
I tried to change page_width, but it did't work.
Thanks,
rubik

Upvotes: 1

Views: 335

Answers (1)

0x60
0x60

Reputation: 1096

Okay, well number one your

div.document {
    width: {{ page_width }}px;
    margin: 0 auto;
}

is set to margin: 0 auto; which makes it centered so your page will be 940px and will be centered (Resizing your page will confirm this). You probably have to change your content width along with the wrapper width, but keep in mind that the amount of padding depends on how large your viewport is.

Alternate

If you just want to make it strictly 3cm on the left and right sides and make the content in the middle have a fluid layout you can do this:

        margin: 0 3cm;
        position: absolute;
        width: auto;

Upvotes: 2

Related Questions