Saturday, 19 May 2012

CSS Styles for custom margins while printing

  1. Create a CSS file and include some margins styles in it (say style.css)
@page {

margin-top: 1in;
margin-right: 1in;
margin-bottom: 1in;
margin-left: 1in;
  1. Create a HTML file and include the above stylesheet (say index.html)
<title> coldsoftmail </title>
<link rel="stylesheet" type="text/css" href="style.css" media="all">
<img src="Desert.jpg">
<input type="button" name="print" value="Print" onClick="javascript: window.print();">

No comments:

Post a Comment