0

I am using bootstrap.min.css and for some reason the background color for "th" is ignored while printing. Is there a way, i can force the color to be printed. I have tried adding the media style to the page, but that is still not creating the background while printing.

<div class="row">
    <div class="col-xs-6">  
         <table class="table" bordercolor="FFFFFF">
            <thead>
              <tr >
                <th 
                style="background-color:ec6619;">


                 <font color="FFFFFF">Label</font></th>
              </tr>


            </thead>

          </table>
        </div>



        <div class="col-xs-6" >
        <table class="table" bordercolor="FFFFFF">
        <thead>
              <tr >
                <th style="color:000; 
                           font-weight:normal; 
                           font-size: 18px;  
                           font-family:Helvetica, Arial, sans-serif;">

                  #someotherlabel#

               </th>
              </tr>


        </thead>

        </table>    

        </div>
</div>
JqueryHelp
  • 21
  • 4
  • Your inline CSS is wrong, the `th` won't have have a background color at all the way it's currently coded, you need to put a `#` in front of the hex code. – APAD1 Apr 25 '16 at 17:45
  • This might help you: http://stackoverflow.com/questions/14987496/background-color-not-showing-in-print-preview – rubentd Apr 25 '16 at 17:45
  • @JqueryHelp you must insert a `td ` or `div` or anything else in your `th` set `background-color ` for him or anything else for that element , not for `th ` , because it does not support some CSS properties – Infem 401 CedupHH Apr 25 '16 at 18:05
  • thank you for the link rubentd, there was an exact example I was looking for. However now thead element is ignoring the background color. this is what gor the th to display the color while printing th.fornewone { background-color: #ec6619 !important; -webkit-print-color-adjust: exact; } – JqueryHelp Apr 25 '16 at 18:31

1 Answers1

0

Most browsers will not print background colors.

There is usually a checkbox in the Print or Page Setup dialog to enable this.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • Slaks, I have tried what you have suugested , i.e. having the background images and colors, but to no avail. – JqueryHelp Apr 25 '16 at 17:47