user2045025
user2045025

Reputation:

background color property not taking in print css

I am trying to give the back ground color for my label in print css. It takes the border color but it does not takes the background-color property of css. how to fix it?

http://jsfiddle.net/gVLeg/embedded/result/

#stateLabelLeftSo {
  display: inline-block; 
  margin-left: 4px; 
  border: 1px solid red; 
  background-color: green;
}


@media print {
  body {
    margin:0;
    padding:0; 
    line-height: 1.4em; 
    word-spacing:1px; 
    letter-spacing:0.2px; 
    font: 12px Arial, Helvetica,"Lucida Grande", serif; 
    color: #000;
  }
  .mainDiv {
    display: none;
  }
  #soLeft { 
    width: 300px;
    border: 1px solid red; 
    background-color: green;
  }
  #billTextSO { 
    width: 101px;
  }
  #attentionTextSo { 
    width: 101px; 
  }
  #addressTextSo { 
    width: 101px; 
  }
  #cityTextSo {
    width: 40px; 
    margin-left: 5px; 
    height: 13px; 
  }

Upvotes: 0

Views: 906

Answers (1)

jiguang
jiguang

Reputation: 362

background-color in css can not be printed by default, and it's not recommended either. The background-color may cover the text. If you want some background, you may directly use images.

Upvotes: 1

Related Questions