1. - Top - End - #28
    Ogre in the Playground
     
    ChristianSt's Avatar

    Join Date
    Feb 2012
    Location
    Germany

    Default Re: [table]s in the Playground - All you want to know about the [table] code

    Quote Originally Posted by dextercorvia View Post
    I tried a basic grid table, but some of the divider lines were bolded, seemingly at random.

    No Padding seems like the way to go, Square uniform cells would be good. I like the Header for Columns, is there a way to do a Header (Lefter?) for rows as well?
    If you have randomly bolded lines it is often because you have wrong zoom settings (that is the case for me at least).

    It is possible to style arbitrary cells like header cells, so it is possibly to make an additional column that looks like headers. (With [td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]<Cell Content>[/b][/color][/td] , as said in the OP)

    The square uniform cells are problematic. It isn't possible to specify the height, so you need to specify a width that comes close to that. For my desktop browser 16px width for each cell looks pretty square to me. But I have no idea if it looks square to others.

    If I understand you correctly, I think the following should be what you want:

    a b c d e f g h i
    A
    B
    C z
    D | -- |
    E | x |
    F | -- |
    G | y |
    H | -- -- |
    I

    Spoiler: Table code
    Show
    Code:
    [table="class:no_side_padding no_line_padding head"]
    [tr]
    	[th="width:16"][/th]
    	[th="width:16"]a[/th]
    	[th="width:16"]b[/th]
    	[th="width:16"]c[/th]
    	[th="width:16"]d[/th]
    	[th="width:16"]e[/th]
    	[th="width:16"]f[/th]
    	[th="width:16"]g[/th]
    	[th="width:16"]h[/th]
    	[th="width:16"]i[/th]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]A[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]B[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]C[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"]z[/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]D[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="align:center"]--[/td]
    	[td="align:center"]|[/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]E[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="align:center"]x[/td]
    	[td="align:center"]|[/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]F[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="align:center"][/td]
    	[td="align:center"]--[/td]
    	[td="align:center"]|[/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]G[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="align:center"][/td]
    	[td="align:center"]y[/td]
    	[td="align:center"]|[/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]H[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="align:center"]--[/td]
    	[td="align:center"]--[/td]
    	[td="align:center"]|[/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]I[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [/table]



    It is also possible to have a chess like background (and discard the inner border because you don't really need it any more), though you basically need to specify the color for each cell, though you can save half that by using alt1/alt2:

    a b c d e f g h i
    A
    B
    C z
    D | -- |
    E | x |
    F | -- |
    G | y |
    H | -- -- |
    I

    Spoiler: Table code
    Show
    Code:
    [table="class:no_side_padding no_line_padding head alt1 alt2 outer_border"]
    [tr]
    	[th="width:16"][/th]
    	[th="width:16"]a[/th]
    	[th="width:16"]b[/th]
    	[th="width:16"]c[/th]
    	[th="width:16"]d[/th]
    	[th="width:16"]e[/th]
    	[th="width:16"]f[/th]
    	[th="width:16"]g[/th]
    	[th="width:16"]h[/th]
    	[th="width:16"]i[/th]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]A[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]B[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]C[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"]z[/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]D[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="bgcolor:#F0E7D3, align:center"]--[/td]
    	[td="align:center"]|[/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]E[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="bgcolor:#DCCDAD, align:center"]x[/td]
    	[td="align:center"]|[/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]F[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"]--[/td]
    	[td="bgcolor:#F0E7D3, align:center"]|[/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]G[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"]y[/td]
    	[td="bgcolor:#DCCDAD, align:center"]|[/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]H[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#F0E7D3, align:center"][/td]
    	[td="align:center"]|[/td]
    	[td="bgcolor:#F0E7D3, align:center"]--[/td]
    	[td="align:center"]--[/td]
    	[td="bgcolor:#F0E7D3, align:center"]|[/td]
    	[td="align:center"][/td]
    [/tr]
    [tr]
    	[td="bgcolor:#8E5A2E, align:center"][color=#FFFFFF][b]I[/b][/color][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    	[td="bgcolor:#DCCDAD, align:center"][/td]
    	[td="align:center"][/td]
    [/tr]
    [/table]


    (The align:center for the regular td's isn't really necessary, though I think it looks better. It might also be possible to enclose the table in a center tag and get alignment for all cells automatically, though that doesn't feel like the right way to do it to me.)


    Edit: It also looks rather square-ish on my mobile browser, so maybe it works for others, too.
    Last edited by ChristianSt; 2014-04-27 at 07:49 AM.

    Problems with [table]?
    All you want to know about [table]!
    The Order of the Stick
    Kickstarter Reward Collection

    Last updated: 2016/08/09, containing:
    9 Crayon Drawings | 21 Stick its | 47 Signature Doodles

    Custom Avatar made by the Giant.

    Thanks!