Using variables for colors in table cells
Posted
by Mark Robinson
on Stack Overflow
See other posts from Stack Overflow
or by Mark Robinson
Published on 2010-04-12T09:52:09Z
Indexed on
2010/04/23
8:43 UTC
Read the original article
Hit count: 212
Using the variables extension, I want to change the background color of a cell in a table. So far I've done this:
{{#vardefine:green|<span style="background:Green; color:White">text</span>}}
The problem is that, when I add {{#var:green}} to the cell, only the text itself has a green background. Ideally, I want the whole cell to have a background color, like it does if I use this:
| bgcolor="#ff00ff" | test
or this
| style="background:silver" |silver
in the cell.
Does anyone know how to solve this?
© Stack Overflow or respective owner