In case you haven't found it yet and it might help someone else, you need 
to read 
https://developers.google.com/chart/interactive/docs/gallery/table?hl=en#configuration-options

There are three parts to getting CSS styles to work in tables.

1) Set the HTML and CSS in options
2) Define the class names
3) Write the styles

The options should contain at a minimum

var options = {
   allowHtml: true,
   cssClassNames: cssNames 
};

Then using whatever you called the cssClassNames (I used cssNames, but it 
can be whatever you want)

var cssNames = {
'headerRow': 'headercss',
'tableCell': 'cellcss'
};

Then write the styling for whatever you called the CSS classes 

<style>
.cellcss { 
    text-align: left;
    padding: 10px;
}
.headercss {
    background-color: blue;     text-transform: uppercase;
    color: white;
}
</style>

On Friday, November 19, 2021 at 9:06:37 PM UTC-5 kiwis wrote:

> I'm looking at Google Charts (specific table charts) as an alternative to 
> my current solution.
>
> Can I apply CSS padding to my table? I want it applied to all rows/columns 
> and cells.
>
> How can I make header backgrounds a specific color and font another?
>
> Also how can I align some content left, middle or right?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/682a34fd-a6e1-4e05-9cfe-b67f55e49cc5n%40googlegroups.com.

Reply via email to