Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

CSS @print

Options
  • 02-04-2014 1:56pm
    #1
    Registered Users Posts: 1,477 ✭✭✭


    Having trouble with CSS (on account of me knowing little about it!) and printing to receipt printers. I have a very small amount of text (3 lines, no styling) to print to a receipt. Chrome prints it fine but IE and Firefox stream a full A4 page out. I am using a print css file with the css below. Can anyone suggest a way to make these browsers only print the 3 lines and then cut, instead of paging loads of blank recript paper?
    @media print
     {
      @page
      {
       margin-bottom: .5em;
       margin-left: .5em;
       margin-right: .6em;
       margin-top: .5em;
       width: 8.5;
       height: 11;
       size: 8.5in 11in;
      }
     }
    


Comments

  • Registered Users Posts: 6,150 ✭✭✭Talisman


    Have you tried reducing the values of the width, height and size properties?

    8.5 x 11 inches is US Letter dimensions.


Advertisement