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: 78
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

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
Joined: 2019-05-21 22:42
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

uchhavi
Veteran Member
Posts: 78
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: 627
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.

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
Joined: 2019-05-21 22:42
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

Post Reply