Tuesday, October 07, 2008

Print.css

Recently, I ran into a case where a user's printout of an order confirmation was cropping a portion along the rights side of the page.

By default, almost all browers print in "Scale-to-Fit" mode.  This particular user happened to be using Print at "100%".

Changed our html/aspx page to the following...

Html

<head id="head" runat="server">
   <link href="/shared/css/style.css" type="text/css" rel="stylesheet">
   <link href="/shared/css/print.css" type="text/css" rel="stylesheet" media="print">
<head>

CSS

body
{
background: white;
margin: 0;
font-size: 0.75em;
width: 660px;
}

#PageContainer
{
width:640px;
}

a:link, a:visited
{
color: #520;
background: transparent;
font-weight: bold;
text-decoration: underline;
}

No comments: