Previously we described how to add margins to a document in Google Docs using tables. But not many people like to use tables. For those who don’t want to use tables or have trouble using tables there is another way to do the same thing using CSS. In this post we describe how you can adjust page margins of a document in Google Docs using CSS.
Open your document with Google Docs and go to Edit > Edit CSS. This will open popup window with text editor. In this editor we will write the CSS style rules to set page margins.
body {
margin-right:10%;
margin-left:10%;
margin-top:20px;
}
Copy paste above given code in the Edit CSS window and press Ok. You will see the result in your document window. Now lets see what this tiny bit of css does. The body is called an attribute which tells your browser that the rules described below apply to entire document. }
this curly bracket marks the beginning of rules. the next three lines describe rules to set margin properties. the last line tells that rules for body end here. Feel free to play with this bit of code go to Edit > Edit CSS again and set different margin size or add a rule to set bottom margin by adding margin-bottom:20px;
just before the }
line. Or you can also replace these three lines with just one line margin:10%;
between the curly brackets.
Cascading Style Sheet (CSS) is an easy way to stylize your document. Using CSS is an effecient method to create style rules for your entire document, or your templates. We will talk more about CSS on this blog in our upcoming posts. However if you want to quickly learn CSS we highly recommend HTML Dog’s CSS for beginners guide, or W3Schools’ CSS tutorial.
jrood: you can send me your method using the contact form and I can add your method with your comment.
drat, i should have known that my code wouldn’t show up… can someone delete my comments
here’s how i do it
go into the EDIT>EDIT HTML and put this in
your paper text
that will make your page have almost exactly the same margins as a default word document
didn’t work for me