ID:156704
 
I've been using a grid as an inventory system lately. I'm just wondering, is it possible to center text in a cell like you do when you place an icon in a cell? I'd like every thing to line up if possible. Thanks for any replies!
Horizontally, yes. Edit the style field of the grid and set the text-align property of the body or class to center.

For instance, to set the entire grid to be centered, try this:
body {text-align:center;}


To set selected portions of the grid to centered, create a class...
.myClass {text-align:center;}

...and then output HTML tags of that class. Spans come in handy for things like this.
Viewer << output("<span class='myClass'>Centered Text</span>","myGrid:1,1")
In response to ACWraith
Sorry for not being more specific; I meant vertically.
In response to Gypsy
Unfortunately, there is no vertical alignment for what's in grid cells.

If you have a set number of cells and don't need to output atoms, you might want to try using a bunch of labels instead of a grid. It might make creating the skin more annoying, but you'd have a variety of alignment options.
In response to ACWraith
Ah, I see. I've considered doing that but there are a couple of problems with that, and besides, I'd like for the player to see what the item actually is. :\ Thanks for the information anyway!