ID:159873
 

I was wondering if anyone could give me a sample of using CSS or HTML to customize output on cells of grids. Tried but couldn't get what I was looking for.

I wanted to put background images on each cell. If anyone can help that would be great.

Happy Holidays! ^_^

Style doesn't seem to be working at runtime :\
You can change the color of a cell's background using CSS, but I don't think you can set the background image. It could have something to do with the fact that grids can only have one image per cell, but I don't know for sure.

Here is the style used in the Guards grid in this picture. (I modified the colors in the grid's appearance options first.)
.act {text-align:right;}
strong {background-color:#FFBF00;color:black;text-align:center;}

I cut out the game-specific code in an attempt to remove confusion, but the source looks sort of like the following:
viewer << output("<strong>Total</strong>","myGrid:2,1")
viewer << output("<a>Default Drone</a>","myGrid:1,2")
viewer << output("<span class='act'>11</span>","myGrid:2,2")
viewer << output("<a class='act'>1</a>","myGrid:3,2")


If you would like help learning CSS, I learned from W3Schools.
In response to Yash 69

thx for the reply... but any other samples would be of help!
In response to ACWraith
ACWraith wrote:
You can change the color of a cell's background using CSS, but I don't think you can set the background image. It could have something to do with the fact that grids can only have one image per cell, but I don't know for sure.

Here is the style used in the Guards grid in this picture. (I modified the colors in the grid's appearance options first.)
.act {text-align:right;}
> strong {background-color:#FFBF00;color:black;text-align:center;}

I cut out the game-specific code in an attempt to remove confusion, but the source looks sort of like the following:
viewer << output("<strong>Total</strong>","myGrid:2,1")
> viewer << output("<a>Default Drone</a>","myGrid:1,2")
> viewer << output("<span class='act'>11</span>","myGrid:2,2")
> viewer << output("<a class='act'>1</a>","myGrid:3,2")

If you would like help learning CSS, I learned from W3Schools.


thanks for the reply AC... helps alot! ^^