Coloring Table Cells with CSS

This seems obvious, but I can’t find much info on applying CSS to table cells. Or using said CSS to give the table’s cells a background color.

1 Like

Here are some examples using CSS and the :nth-child pseudo class.

image

table-css-tip-trick.json (2.6 KB)

have fun
mario

3 Likes

That’s a macro there, but how exactly is the CSS applied to the table.

I mean specifically, how do I apply a css class to a wikitext table.

The start of the table can be like this:

|myClass anOtherClass|k

As documented at. Tables in WikiText – Scroll down to the last section

Also see Tables in WikiText CSS Utility Classes

2 Likes