CSS Print Layout - Printing on a Single Page

后端 未结 2 1670
星月不相逢
星月不相逢 2021-02-01 17:52

I\'m badly stuck and the SO archives aren\'t helping me. Maybe I\'m looking in the wrong place. Here\'s the short story:

  • I\'ve got a view that I need to get printe
2条回答
  •  旧时难觅i
    2021-02-01 18:03

    It sounds like your image is just too big. Since the image is custom-sized, why not set

    img { height: 100%; }
    

    instead of width? That would at least ensure that it didn't spill over to a second page.

    Bear in mind also that printers are more variable than browsers. You may be able to eke out every last inch of space on your printer, but someone else's might have significantly different print margins and ruin all your hard work.

提交回复
热议问题