Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brenooandrade/e187b9ee8632048bd2258f6774eda7b0 to your computer and use it in GitHub Desktop.
Save brenooandrade/e187b9ee8632048bd2258f6774eda7b0 to your computer and use it in GitHub Desktop.
A4 CSS page template
<page size="A4"></page>
<page size="A4"></page>
<page size="A4"></page>
<page size="A4"></page>
<page size="A4"></page>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
body {
background: rgb(204,204,204);
}
page[size="A4"] {
background: white;
width: 21cm;
height: 29.7cm;
display: block;
margin: 0 auto;
margin-bottom: 0.5cm;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
border: 1.25cm solid #000;
}
@media print {
body, page[size="A4"] {
margin: 0;
box-shadow: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment