Cell Background color in Printout

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Cell Background color in Printout

Post by uchhavi » 2020-04-28 04:48

Hi,

I have written the following code to change the background color in my form

Code: Select all

<th colspan = "4" style="text-align:center; background-color: #CCCCCC;"><b>DELIVERY & PACKING DETAILS</b></th>
this is working fine on screen, but when i am printing the document, the background color is not appearing.

Please can you help solve this.
Best regards,

Chhavi Jain

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Cell Background color in Printout

Post by onoehring » 2020-04-28 08:18

Hi,

I suggest you define the CSS in an external stylesheet.
To have the background color in print, you need to add !important to the definition.
try:

Code: Select all

<th colspan = "4" style="text-align:center; background-color: #CCCCCC !important;"><b>DELIVERY & PACKING DETAILS</b></th>
Olaf

uchhavi
Veteran Member
Posts: 80
Joined: 2018-05-15 14:07

Re: Cell Background color in Printout

Post by uchhavi » 2020-04-28 09:06

the code u gave is not working... is there any other suggestion u can give?
Best regards,

Chhavi Jain

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Cell Background color in Printout

Post by jsetzer » 2020-04-28 09:17

As far as I remember the default Bootstrap stylesheet removes many color attributes if @media is print.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Cell Background color in Printout

Post by onoehring » 2020-04-28 09:21

Hi,

try to define your own css class with the !important and include that:

Code: Select all

<th colspan = "4" class="YOURCLASS"><b>DELIVERY & PACKING DETAILS</b></th>
und

Code: Select all

YOURCLASS{text-align:center; background-color: #CCCCCC !important;}
Olaf

Post Reply