2

I have been trying to create an exact view of my HTML form when i strike ctrl+p but my CSS is being ignored in a print view and all the styling i did for textfields, radio buttons etc they are not being displayed and by default styling is being displayed in the print view. Following is my page where I want to apply the same print view the way the form really is

Kindly let me know how can I do that.

My Page

Note: I tried to media="all" on my attached stylesheet and also created another css file for print view (The css file is same i used for the styling of my form) print.css and include that file by

<link rel="stylesheet" href="css/print.css" type="text/css" media="print"  charset="utf-8" />

` But it also did not worked and after doing this in print view my customized form elements does not appear.

soft genic
  • 2,016
  • 3
  • 27
  • 44

2 Answers2

2

You are using background images to style the form inputs, but non current browser does print any background images. This is not a bug but a feature to save toner ink.

See also How can I print background images in FF or IE? ans similar questions.

Community
  • 1
  • 1
feeela
  • 29,399
  • 7
  • 59
  • 71
  • @Mr. Alien I used the code inspector in Chromium. No need to know the source URL for the CSS file. – feeela Jul 27 '12 at 13:04
  • He has not even linked the stylesheet on the page he's pointing to hehe.. View source and check yourself.. – Mr. Alien Jul 27 '12 at 13:06
  • @Mr.Alien i have uploaded that stylesheet now kindly see if you can help all i want that images i used for form elements should be displayed in print view. KIndly visit this url http://caremerge.us/rai_form/form1.html – soft genic Jul 27 '12 at 13:17
  • @softgenic Did you read feeela's answer? Or else if you want to see the layout correctly use `media="screen"` and link another as `media="print"` or click on page setup and click on `print background(colors and images)` – Mr. Alien Jul 27 '12 at 13:24
  • @Mr. Alien `print background(colors and images)` Which browser does have such an option? I don't see it in Opera, Firefox or Chromium. Also teh stylesheet was correctly linked – otherwise the forms weren't styled… – feeela Jul 27 '12 at 13:32
  • @feeela Go to File -> Page Setup and see there will be such option – Mr. Alien Jul 27 '12 at 13:36
  • @feeela Am using w7 I guess your menu bar is off, press alt, click on file and select page setup btw am using firefox 10.2 – Mr. Alien Jul 27 '12 at 14:03
-3

Use html5.js it will help for web print. As print will not proper as for design expertise. http://paulirish.com/2011/the-history-of-the-html5-shiv/ or https://github.com/aFarkas/html5shiv

Shakti
  • 218
  • 2
  • 15