Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css print font not changing

Tags:

html

css

Im designing a printer friendly page and im stuck trying to alter the font properties[font-size, font-family] in CSS.I have got no idea what im doing wrong here. The font properties i have specified for the body tag in the CSS file doesn't seem to work at all.

Could somone please explain to me what im doing wrong here ?

html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
  <head>
   <title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" media="print" href="print.css">
</head>

<body>
<div id="wrapper">
    <table width="100%" border="1">
        <tr >
            <td >Job No</td>
            <td>4589</td>
        </tr>
        <tr>
            <td>Job No</td>
            <td>6578</td>
        </tr>
    </table>
</div>
</body>
</html>

css

/* CSS Document */
div#wrapper 
{
    margin-left:auto;
    margin-right:auto;
    width:auto;

}
body {
background-color: transparent;
font-size: 12pt;
font-family:'Times New Roman',Times,serif;
color:#000000; }
like image 432
manraj82 Avatar asked Sep 01 '10 10:09

manraj82


1 Answers

Try explicitly specifying the font properties for the td:

table tr td {
  font-size: 12pt;
  font-family:'Times New Roman',Times,serif;
}
like image 141
Pekka Avatar answered Oct 01 '22 20:10

Pekka