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 changepage_width
, but it did't work.
Thanks,开发者_Python百科
rubikOkay, 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;
精彩评论