Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@page Css style not working for Mozilla firefox

My requriment is to provide 10cm margin to all the page when printing.

I'm printing using window.print(). My web page will dynamically increase (so number of pages cannot be determined). For all the pages I need to provide margin of 10 cm.

I used CSS Media="Print", within which I defined the style:

  @page
  {
     Margin-top :10cm; 
  }

This is working in all the browsers except Mozilla firefox. I searched for solutions and all the blogs say, Mozilla will not support @page, but No Solution. Can someone help me on this? Please let me know is it posible to implement in mozilla

like image 941
saTech Avatar asked Aug 03 '12 09:08

saTech


People also ask

How do I enable CSS in Firefox?

css modifications are disabled in Firefox. You need to make sure that on the <code>about:config</code> page in Firefox, the <code>toolkit. legacyUserProfileCustomizations. stylesheets</code> preference is set to <code>true</code> and then restart the browser.

How do I get CSS selector in Firefox?

Simply right click and click Inspect Element. This will bring up the CSS selectors for that element.


1 Answers

Sorry, I know your question is quite old, but it showed up on a google query I had for the same problem.

According to this link (https://developer.mozilla.org/en-US/docs/Web/CSS/@page) it's supported in Firefox since 19.0, which was after your post, just for completeness...

like image 161
Marco Freudenberger Avatar answered Oct 18 '22 11:10

Marco Freudenberger