Css print font does not change

I am creating a printable page and am trying to change the properties of the [font-size, font-family] font in CSS. I have no idea what I'm doing wrong here. The font properties that I specified for the body tag in the CSS file do not work at all.

Can someone explain to me what I'm 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; } 
+4
source share
2 answers

Try explicitly specifying the font properties for td :

 table tr td { font-size: 12pt; font-family:'Times New Roman',Times,serif; } 
+6
source

Try using this CSS.

 #wrapper { margin-left:auto; margin-right:auto; width:auto; } #wrapper table { font-family:"Times New Roman", Times, serif; font-size: 12pt; } body { background-color: transparent; font-family:"Times New Roman", Times, serif; font-size: 12pt; color:#000000; } 
0
source

All Articles