Jes Sie

Jes Sie

  • 736
  • 1.2k
  • 284.3k

CSS Print StyleSheet Not Working on Webforms

Oct 1 2017 9:57 PM
Can someone help me how to use correctly the css for media print? I'm very novice when it comes to html and css, hence, all the styles that I use is inline. I tried to follow what I found on google on how to use the media print but no luck. Below is a snippet of my css media print where it doesn't work.
  1. <style>  
  2.         @media print {  
  3.             .imageLogo {  
  4.                 margin-top: 5px;  
  5.             }  
  6.   
  7.             .fontfamily {  
  8.                 font-family: 'Phetsarath OT';  
  9.                 text-align: center;  
  10.                 font-weight: bold;  
  11.             }  
  12.   
  13.             .regularfont {  
  14.                 text-align: center;  
  15.                 font-weight: bold;  
  16.             }  
  17.   
  18.             .sched {  
  19.                 text-align: center;  
  20.                 font-weight: bolder;  
  21.                 font-family: 'Phetsarath OT','Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;  
  22.                 font-size: 35px;  
  23.             }  
  24.   
  25.             .leftSide {  
  26.                 width: 200px;  
  27.             }  
  28.   
  29.             .next-to-left {  
  30.                 width: 300px;  
  31.             }  
  32.   
  33.             .grid {  
  34.                 margin-left: 200px;  
  35.             }  
  36.   
  37.             .gridview td {  
  38.                 width: 300px;  
  39.                 text-align: center;  
  40.             }  
  41.         }  
  42.     </style>  
 Thanks in advance for any help.

Answers (3)