Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

background printing issue with twitter bootstrap

I'm using Twitter Bootstrap and try to print page with background. I tried all the options in the web browser , but it doesn't work. If I don't include twitter bootstrap, the printing of the background works perfectly. (by the way, on this particular page I'm not using anything related to TBS).

Is there anything I can do to make it work (a kind of reset ) without excluding TBS ?

like image 343
mb14 Avatar asked Dec 06 '22 08:12

mb14


1 Answers

The Bootstrap css file has an "@media print" section which sets the following css rule:

* {
    color: #000 !important;
    text-shadow: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

As you can see that sets all backgrounds to be transparent.

You'd need to override that in your custom style sheet or change it in the bootstrap.css file.

like image 162
Billy Moat Avatar answered Jan 24 '23 08:01

Billy Moat