The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How can I print thin borders?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #248577

    When I use border: 1px solid black; it looks fine online, but the line that it prints is still wider than I would like, and wider than it looks online.

    Is there a way to print a line thinner than 1px? I know my printer can do it because there are other characters on the page that have thinner widths.

    Here is the code that I’m using


    em or rem will let you use decimals


    Pixels can be expressed as decimals too.

    But browsers render and round-up fractional ‘pixels’ differently, so reducing 1px to lesser values is likely to give inconsistent results across the board. A screen pixel isn’t the same as a print pixel either, so what about using @media print to apply fractional border widths, but only for print. Working in point (pt) units might also prove more predictable in those circumstances too (points were made for print).

    More info on print stylesheets

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.