Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

To request landscape printing, add @page { size: Letter landscape; } inside a print stylesheet, then size the content to fit the page without distorting it. CSS controls the document’s print layout, but it cannot reliably force a browser’s “Fit to page” choice or override a printer’s physical margins and scaling.

What “fit to page” means

The phrase can describe three separate steps:

  • CSS layout: arranging and sizing content within the page. Your stylesheet controls this directly.
  • Browser print scaling: scaling the rendered pages in the print dialog. CSS can influence the result, but generally cannot select a particular scaling option for the user.
  • Printer-driver scaling: adapting the print job to the printer or paper. This is outside the web page’s control.

There is no standard fit-to-page: true CSS property. A practical solution is to make the print layout fit the intended sheet, then check the browser’s print preview and settings.

Request landscape orientation and paper size

Use a print media rule and the @page size descriptor:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
@media print {
  @page {
    size: Letter landscape;
    margin: 0.25in;
  }
}

For A4 paper, use size: A4 landscape;. Letter is 8.5 × 11 inches; A4 is 210 × 297 mm. They are similar, but not identical, so tightly sized content can clip or reflow when the selected paper differs from the one you designed for. The MDN reference for @page size documents the size and orientation syntax. The descriptor is broadly available in modern browsers, but older browsers, embedded webviews, and print services can behave differently.

#1 Best Overall
Brother DCP-L2640DW Wireless Compact Monochrome Multi-Function Printer, Copy, Scan, Duplex, Mobile Printing
  • BEST FOR SMALL BUSINESSES – Engineered for extraordinary productivity, the Brother DCP-L2640DW Monochrome (Black & White) 3-in-1 combines laser printer, scanner, copier in one compact footprint and delivers high-quality black & white prints
  • FAST PRINTER WITH EFFICIENT SCANNING – Produces documents quickly with print speeds up to 36 ppm(2) and scan speeds up to 23.6/7.9 ipm(3) (black/color). A 50-page auto document feeder(4) allows for convenient, time saving multi-page scanning and copying
  • FLEXIBLE CONNECTION OPTIONS – Easily navigate the changing demands of your business with secure multi-device connectivity via built-in dual-band wireless (2.4GHz / 5GHz) and Ethernet. Or connect locally to a single computer via USB interface
  • BROTHER MOBILE CONNECT APP – Print, scan, and manage your wireless printer anytime, from almost anywhere from your mobile device. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(5)
  • CHOOSE BROTHER GENUINE TONER – When it’s time to replace your toner, be sure to choose Brother Genuine TN830 or TN830XL replacement toner. And with Refresh EZ Print Subscription Service, you’ll never worry about running out of toner again and you’ll enjoy savings of up to 50%(6) on Brother Genuine Toner. Get started with Refresh today with a Free Trial(1)

Put print rules in the page’s CSS using @media print, or load a separate stylesheet only for printing:

<link rel="stylesheet" href="/css/print.css" media="print">

See MDN’s printing guide for more on print media rules and print-specific layout.

Rank #2
Brother HL-L2405W Wireless Compact Monochrome Laser Printer with Mobile Printing, Black & White Output | Includes Refresh Subscription Trial(1), Works with Alexa
  • BEST FOR HOMES & HOME OFFICES – Engineered for consistent, premium print quality, the Brother HL-L2405W Monochrome (Black & White) Laser Printer delivers sharp, crisp prints at an affordable price. Prints one-sided documents at speeds up to 30ppm(2)
  • COMPACT, CONNECTED PRINTER – Flexible connection options make this an ideal printer for home use and at-home offices. Securely connect to multiple devices with built-in dual-band wireless (2.4GHz/5GHz) or locally to a single computer via USB interface
  • BROTHER MOBILE CONNECT APP – Manage your printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
  • VERSATILE PAPER HANDLING – Enjoy seamless, reliable everyday printing with the 250-sheet paper tray(4) and a manual feed slot that enables printing on envelopes and specialty pape
  • BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer

Fit one image without stretching it

For an image that should fill the page width while keeping its original proportions, use width: 100% and height: auto. The image may leave unused space above or below if its shape differs from the paper’s.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<main class="print-page">
  <img src="/images/report.jpg" alt="Report">
</main>
@media print {
  @page {
    size: Letter landscape;
    margin: 0.25in;
  }

  html,
  body {
    margin: 0;
    padding: 0;
  }

  .print-page {
    width: 100%;
    margin: 0;
  }

  .print-page img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
  }
}

Choose a different fitting behavior when the image must use both dimensions of a page-sized box:

Rank #3
Sale
Canon imageCLASS LBP6030w - Monochrome Single-Function Wireless Compact Wireless Laser Printer, 1 Year Limited Warranty, 19 PPM, White - Print Only
  • FAST PRINT SPEEDS: Print up to 19 pages per minute.
  • COMPACT DESIGN: Space-saving, compact design fits anywhere in your home, school or small office.
  • WIRELESS CONNECTIVITY: Print from almost anywhere in your workspace using your compatible mobile device.
  • PAPER CAPACITY: Up to 150 sheets.
  • SUSTAINABILITY: Uses less than 2 watts in Energy Saver mode.
  • object-fit: contain: shows the entire image without distortion. It can leave whitespace.
  • object-fit: cover: fills the box while preserving proportions, but crops the image. Use it only when cropping is acceptable.
  • object-fit: fill: fills both dimensions but can stretch the image. Use it only when distortion is acceptable.

For example, if a wrapper has a definite height, this keeps the complete image visible:

@media print {
  .print-page {
    height: 100%;
  }

  .print-page img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

Percent heights need a containing block with a usable, definite height. If the wrapper and its ancestors have automatic heights, height: 100% or 90% may not refer to the page height you expect. Size the actual print wrapper deliberately and check the result in print preview. Viewport units such as 100vh are not a guarantee of an exact physical page size in every print engine.

Rank #4
Brother HL-L2460DW Wireless Compact Monochrome Laser Printer with Duplex, Mobile Printing, Black & White Output | Includes Refresh Subscription Trial(1), Works with Alexa
  • BEST FOR HOME OFFICES & SMALL TEAMS – Engineered for consistent, premium print quality, the Brother HL-L2460DW Monochrome (Black & White) Laser Printer produces documents that are clear, crisp, and easy to review and share, all at an affordable price
  • COMPACT, CONNECTED, EXCEPTIONALLY EFFICIENT– Connect with built-in dual-band wireless (2.4GHz/5GHz), Ethernet, or to a single computer via USB interface. Prints at speeds up to 36ppm(2), plus automatic duplex printing saves time and reduces paper waste
  • BROTHER MOBILE CONNECT APP – Manage your wireless printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
  • VERSATILE PAPER HANDLING – Tackle high-volume black & white printing with the 250-sheet capacity paper tray.(4) The manual feed slot enables printing on envelopes and specialty paper
  • BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer

Margins, physical size, and printer limits

The @page margin sets the page’s CSS margin. Setting it to zero removes that CSS margin, but does not guarantee edge-to-edge ink: many printers have an unprintable hardware area unless borderless printing is supported and enabled.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can use physical units for a controlled print component, for example width: 11in; height: 8.5in; for a Letter landscape sheet, or width: 297mm; height: 210mm; for A4 landscape. Treat these as layout targets rather than a promise that every printer will print to the edge. For ordinary content, a margin such as 0.25in is usually safer than assuming borderless output.

Best Value
HP LaserJet M110w Wireless Black & White Printer, Print, Fast speeds, Easy Setup, Mobile Printing, Best-for-Small Teams
  • FROM AMERICA'S MOST TRUSTED PRINTER BRAND – Perfect for small teams printing professional-quality black & white documents and reports. Perfect for 1-3 people
  • WORLD'S SMALLEST LASER IN ITS CLASS – Precision laser printing that fits anywhere
  • FAST PRINT SPEEDS – Up to 21 black-and-white pages per minute single-sided
  • WIRELESS WITH SELF-RESET – Helps you stay connected
  • PRINT FROM ANY DEVICE – Wireless printing from any mobile device, PC or tablet. Works with Microsoft, Mac, AirPrint, Android, Chromebook and more
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why not rotate the page or use zoom?

Page orientation, content rotation, and scaling are different jobs. @page { size: landscape; } requests a landscape sheet. transform: rotate() rotates content within that sheet; combining them can leave content sideways, offset, or clipped. Rotate an element only when the content itself genuinely needs to be turned.

Avoid relying on nonstandard or historically inconsistent zoom and prefixed transforms as a fit-to-page method. They can change overflow and positioning, complicate page breaks, and behave differently in print preview and PDF output. Prefer normal layout sizing, page rules, max-width, and aspect-ratio-preserving image rules.

Print a document, table, or multi-page report

A web document may need a different layout on paper: hide navigation and controls, remove screen-only spacing, and let long content span pages instead of shrinking everything onto one sheet. For example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
@media print {
  @page {
    size: Letter portrait;
    margin: 0.5in;
  }

  body {
    margin: 0;
    color: #000;
    background: #fff;
    font: 10.5pt/1.35 system-ui, sans-serif;
  }

  nav,
  aside,
  button,
  .no-print {
    display: none !important;
  }

  img,
  svg,
  canvas,
  table {
    max-width: 100%;
  }

  figure,
  img,
  tr,
  .avoid-break {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .new-page {
    break-before: page;
    page-break-before: always;
  }
}

Use break-inside: avoid selectively for items that should stay together, such as a figure or a short table row. Do not force a multi-page table or report into a fixed page height; it needs room to fragment. Test table headers and page breaks in the browsers and print destinations your readers use.

Troubleshooting print output

  • Content is clipped: Check that the selected paper matches @page, reduce oversized content or margins, and verify the browser’s scaling setting. Images, SVGs, and canvases can use max-width: 100%; height: auto; where preserving proportions matters.
  • The image is stretched: Avoid forcing both width and height without an appropriate object-fit. Use height: auto or contain.
  • Landscape preview prints in portrait: Remove accidental rotation, then check orientation in both the browser dialog and printer driver. Save to PDF to see whether the problem occurs before the physical printer is involved.
  • @page seems ignored: Check the selected paper and orientation in the print dialog, and consider whether an older browser, webview, or print service is using a different rendering path.
  • Content is unexpectedly small: Check whether the browser is scaling a wide layout down to one page, and whether screen-only columns, padding, or margins remain in the print layout. Let a report use more pages rather than shrinking it until it is unreadable.
  • A white border remains: Zero CSS margins cannot override a printer’s physical limits. Use a borderless-capable printer with borderless mode enabled if edge-to-edge printing is essential.
  • An enlarged image looks blurry: CSS changes display size, not source detail. Supply an image with enough resolution for its intended physical print size.

Test the result

  1. Open the browser’s print preview and check orientation and paper size.
  2. Choose “Save to PDF” first. This helps distinguish a browser-layout problem from a printer-driver or hardware problem.
  3. Inspect all four page edges and confirm the expected margins and scaling.
  4. If readers may use both, test Letter and A4 rather than assuming the layouts are interchangeable.
  5. Check headers and footers, background graphics, and margin settings in the print dialog; labels and options vary by browser.
  6. Test on a physical printer if the final output depends on its printable area, paper tray, or borderless capabilities.
  7. Check a multi-page version if the content can overflow, and verify that the source image is detailed enough at the intended print size.

When a PDF is the better choice

Browser printing is suitable for ordinary web content when some variation between browsers and printers is acceptable. Generate a controlled PDF instead when pagination and dimensions must be repeatable—for example, for forms, tickets, labels, certificates, or documents that need precise margins, bleed, crop marks, embedded fonts, archiving, or digital signatures. A PDF still depends on the user’s print settings and hardware, but it gives you more control over the document supplied for printing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.