I use bootstrap. I set up the adaptive, but when the page is printed, the whole layout disappears.

I heard that printing is done separately layout. Is it possible to somehow miss this moment and in no way change the styles and arrangement of the blocks in order to print the page as it is?

  • Welcome to Stack Overflow in Russian ! here the practice is accepted: one question - one (and more) answers to it. You can correct the question text by clicking edit below the question text. ask another question - using the appropriate button in the upper right corner of the page. - aleksandr barakin

1 answer 1

In principle, you heard everything correctly - you need a separate layout.
To print, you need to create separate media requests.

 @media print { /* [ваши стили] */ } 

Maybe it makes sense to stuff it even into a separate .css file, for convenience.

As for the second question - as you were told in the comments, issue it as a separate question, please.

  • It does not work, in the main styles I try @media print {html, body {background-color: black! Important; }} but when previewing, no changes ... - Anatoly
  • Your importnant is incorrectly written. Maybe this is the problem? Also try changing the background color, but something else. Still, not all printers / browsers / systems love to print. Try changing the background or making a frame about some element ... Well, just to make it clear that @media print {} reads - cyadvert
  • the important code was correctly written, you were right, apparently unacceptable for the print background color of the entire document. - Anatoly
  • If I answered your question, please mark the answer as accepted (tick to the left of the answer). need to improve the statistics of answered questions. :) Thank you - cyadvert
  • And do not forget to remove the second question from this question and issue it separately. - cyadvert