Reputation: 2358
Is it possible remove white space (padding) inside cell?
Query return cell background color like this:
Select
'<span style="background-color: #B8817D">' || col_1 || '</span>' as "1",
'<span style="background-color: #B8817D">' || col_2 || '</span>' as "2",
'<span style="background-color: #F7DC6F">' || col_3 || '</span>' as "3",
'<span style="background-color: #F7DC6F">' || col_4 || '</span>' as "4"
.....
Upvotes: 1
Views: 7529
Reputation: 716
I'd like to reference to this clean solution from Kutub Tech: youtube – code to be found here
Steps:
.a-IRR-table tr td[headers*="rep_col_diffcolor_1"] {
background-color: #99ccff;
}
.a-IRR-table tr td[headers*="rep_col_diffcolor_2"] {
background-color: #bfc4c9;
}
Upvotes: 0
Reputation: 1760
It requires a bit of hacking, but it should work.
First add this page level inline CSS:
.no-parent-padding {
padding: 8px;
margin: -12px -12px;
}
.yellow-background {
background-clip: content-box;
box-shadow: inset 0 0 0 12px yellow;
background-color: yellow;
}
.brown-background {
background-clip: content-box;
box-shadow: inset 0 0 0 12px brown;
background-color: brown;
}
Next the SELECT should look as follow:
select
'<div class="brown-background no-parent-padding">'|| 12 ||'</div>' AS "12",
'<div class="yellow-background no-parent-padding">'|| 2 ||'</div>' AS "2"
....
Upvotes: 4