Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

330
Views
changing page size while printing in html using css displaying wrong

i have a php website where some data is displayed in a page and user can print it using the javascript print button i have given, the page while printing looks like below:

function myFunction() {
    window.print();
}

enter image description here

now i have given the user to select the page size they want and print accordingly, so i did the following css:

    @media print {
              @page {
          size: A4;
      }
      }

i have goven 3 options for the user A3,A4,A5. A3 is coming fine while A4 and A5 is misaligned for example like below:

enter image description here

can anyone please tell me how to fix it, thanks in advance

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!