Internal Borders on Tables

Hardhead
Hardhead
edited May 2010 in Campaign Portal Building
I've been trying to get this to work for hours now. There doesn't seem to be any way to get textile to put internal borders in, and when I use html, it won't accept the "border" attribute. There's *got* to be some way to do this, right?

Comments

  • JimTriche
    JimTriche
    Posts: 483
    If you figure it out, let me know haha! I've been trying for months.
  • Hardhead
    Hardhead
    Posts: 65
    Sigh. Yeah... I've been looking it up, and supposedly it's really easy to modify RedCloth to allow this... it's a simple CSS tweak. Unfortunately, we can't modify the CSS. Maybe we should beg the staff for this as a feature request. It'd take 'em all of 15 minutes to do, and it'd be a big quality of life improvement, at least for me.
  • gnunn
    gnunn
    Posts: 423
    There is, but it's a bit obnoxious. basically, you have to plug the textile code into each individual cell. It's one of the limitations of the markup format.

    If you want to do it, it works like so...

    table{border:1px solid black}.
    |{border:1px solid black}. cell text |{border:1px solid black}. cell text |{border:1px solid black}. cell text |
    |{border:1px solid black}. cell text |{border:1px solid black}. cell text |{border:1px solid black}. cell text|
    |{border:1px solid black}. cell text |{border:1px solid black}. cell text |{border:1px solid black}. cell text |
    |{border:1px solid black}. cell text |{border:1px solid black}. cell text |{border:1px solid black}. cell text |

    Note: I added the "table{border:1px solid black}." at the beginning to create and extra border around the whole table, otherwise the internal borders appear twice as thick as the external borders, because each internal border is actually 1px from each cell butting up against each other. Unfortunately, the code would get even more obnoxious if you wanted to code things to prevent this from happening.

    I personally have found a happy medium by just using alternating row colors similar to the style in D&D gamebooks, which is much less cumbersome to code.

    example:

    table{width:700px;border:1px solid black;font-family:arial}.
    {background:#666666;color:#ffffff}. | +*Item*+ |=. +*Qty.*+ |=. Aura? |=. ID? |=. +*Recipient*+ |=. +*Location Found*+ |=. +*Notes*+ |
    {background:#ddd}. | Coins |=. n/a | == == | == == | == == |=. -- |=. -- |
    {background:#fff}. | item |=. qty |=. ? |=. ? |=. recipient |=. found | == == |
    {background:#ddd}. | item |=. qty |=. ? |=. ? |=. recipient |=. found | == == |

    To use this method, you only need to add an attribute at the beginning of each row.

    eg. "{background:#ddd}." shades the whole row in gray.
  • JimTriche
    JimTriche
    Posts: 483
    Gnunn to da rescue!
  • Hardhead
    Hardhead
    Posts: 65
    Yeah, thanks gnunn. I just hand-coded my campaign "calendar":http://www.obsidianportal.com/campaign/world-of-crucible/wikis/calendar using that method.
  • gnunn
    gnunn
    Posts: 423
    Another little FYI:

    The same thing goes for altering the text size in your tables. Oddly enough, you can alter the font in the initial table attributes, but to change it's size, you have to code the adjustment into each cell.
  • gnunn
    gnunn
    Posts: 423 edited May 2010
    @ hardhead

    Another option you might want to consider for working around the lack of a calendar feature is to create a calendar in a Google Docs spreadsheet and link between your campaign and the sheet. That's what I do.

    Go to "this page":http://www.obsidianportal.com/campaign/the-westerlands/wikis/the-adventure-so-far and click Calendar of Events to check it out.

    I'm in the process of reformatting it to take advantage of some of Google Docs new features... it can be tough to make it pretty, but it works well enough so far.
    Post edited by gnunn on
  • JimTriche
    JimTriche
    Posts: 483
    I stole some code from a website and modified it slightly:

    "2058 Calendar":http://www.obsidianportal.com/campaign/intothebreach/wikis/calendar-2058
  • gnunn
    gnunn
    Posts: 423
    Hey, that's Swanky! I like it!

    So, would you break out an individual page for each day or month? It looks kind of small to fill in in its current format
  • JimTriche
    JimTriche
    Posts: 483
    I would actually want a modified version of Hardheads up there, one for each month, but since time moves fairly ambiguously at times in our campaign, it's not something I'm doing at the moment.

    Gnunn, to center that cell's data, would you use

    |{border:1px solid white}=. "Yadda Yadda" |

    ?
  • Hardhead
    Hardhead
    Posts: 65 edited May 2010
    Jim, that looks really good. One minor suggestion is to do a colspan for the month name so the first column isn't wider than the others. Probably just spaning it two would be enough. Just add "\2." (or, since you're already doing "_." to make it a header column, combine them as "_\2.", which I'm sure you already know, but just an fyi for anyone else reading. :)

    In fact, if anyone is curious about mine, the code I used to make my calendars is...

    table{border:1px solid black}.
    |\7={background:#009999}. Winter|
    |_.S|_.M|_.Tu|_.W|_.Th|_.F|_.S|
    |{border:1px solid black}. -||{border:1px solid black}. -||{border:1px solid black}. -||{border:1px solid black}. -||{border:1px solid black}. -||{border:1px solid black}. -||{border:1px solid black;background:#009999}. WS|
    |{border:1px solid black}. 1|{border:1px solid black}. 2|{border:1px solid black}. 3|{border:1px solid black}. 4|{border:1px solid black}. 5|{border:1px solid black}. 6|{border:1px solid black}. 7|
    |{border:1px solid black}. 8|{border:1px solid black}. 9|{border:1px solid black}. 10|{border:1px solid black}. 11|{border:1px solid black}. 12|{border:1px solid black}. 13|{border:1px solid black}. 14|
    |{border:1px solid black}. 15|{border:1px solid black}. 16|{border:1px solid black}. 17|{border:1px solid black}. 18|{border:1px solid black}. 19|{border:1px solid black}. 20|{border:1px solid black}. 21|
    |{border:1px solid black}. 22|{border:1px solid black}. 23|{border:1px solid black}. 24|{border:1px solid black}. 25|{border:1px solid black}. 26|{border:1px solid black}. 27|{border:1px solid black}. 28|
    |{border:1px solid black}. 29|{border:1px solid black}. 30|{border:1px solid black}. 31|{border:1px solid black}. 32|{border:1px solid black}. 33|{border:1px solid black}. 34|{border:1px solid black}. 35|
    |{border:1px solid black}. 36|{border:1px solid black}. 37|{border:1px solid black}. 38|{border:1px solid black}. 39|{border:1px solid black}. 40|{border:1px solid black}. 41|{border:1px solid black}. 42|
    |{border:1px solid black}. 43|{border:1px solid black}. 44|{border:1px solid black}. 45|{border:1px solid black}. 46|{border:1px solid black}. 47|{border:1px solid black}. 48|{border:1px solid black}. 49|
    |{border:1px solid black}. 50|{border:1px solid black}. 51|{border:1px solid black}. 52|{border:1px solid black}. 53|{border:1px solid black}. 54|{border:1px solid black}. 55|{border:1px solid black}. 56|
    |{border:1px solid black}. 57|{border:1px solid black}. 58|{border:1px solid black}. 59|{border:1px solid black}. 60|{border:1px solid black}. 61|{border:1px solid black}. 62|{border:1px solid black}. 63|
    |{border:1px solid black}. 64|{border:1px solid black}. 65|{border:1px solid black}. 66|{border:1px solid black}. 67|{border:1px solid black}. 68|{border:1px solid black}. 69|{border:1px solid black}. 70|
    |{border:1px solid black}. 71|{border:1px solid black}. 72|{border:1px solid black}. 73|{border:1px solid black}. 74|{border:1px solid black}. 75|{border:1px solid black}. 76|{border:1px solid black}. 77|
    |{border:1px solid black}. 78|{border:1px solid black}. 79|{border:1px solid black}. 80|{border:1px solid black}. 81|{border:1px solid black}. 82|{border:1px solid black}. 83|{border:1px solid black}. 84|
    |{border:1px solid black}. 85|{border:1px solid black}. 86|{border:1px solid black}. 87|{border:1px solid black}. 88|{border:1px solid black}. 89|{border:1px solid black}. 90|
    Post edited by Hardhead on
  • gnunn
    gnunn
    Posts: 423
    @Jim Yes, that code should center the text in the cell.

    bq. ==|{border:1px solid white}=. "Yadda Yadda" |==
  • JimTriche
    JimTriche
    Posts: 483
    Uhm colspa? Wha?

    I copied it and changed little bits until it fit. I dunno about the code itself. It's mostly what it is.

    Here it is (Just January and February, the whole thing won't fit here)



    - 2 0 5 8 -





    Jan
    SMTWTFS

    ---- 1 2 3 4 5


    6 7 8 9101112

    13141516171819


    20212223242526

    2728293031----






    Feb
    SMTWTFS

    ---------- 1 2


    3 4 5 6 7 8 9


    10111213141516

    17181920212223


    2425262728----
  • Hardhead
    Hardhead
    Posts: 65 edited May 2010
    Ahhh... I thought you were using Textile, Jim. My bad. I think you're supposed to have quotation marks around colspan. So it should be

    bc. colspan="7"

    not

    bc. colspan=7

    But it seems to be moot becuase I tried it myself and it didn't look like the site was accepting colspan in HTML. You could do that in textile, but then, I don't think textile has a way to change font size to small, unless gnunn knows a way.
    Post edited by Hardhead on
  • gaaran
    gaaran
    Posts: 740
    Well, I wasn't really looking for any information on this stuff, but I took a look at gnunn's calendar, and wow, that's awesome. Very cool idea. :)
  • Calion
    Calion
    Posts: 144 edited July 2011
    Okay, but is there any way to do it like this?


    table.tableborders td {
    border:2px solid black;
    }

    table(#tableborders){border:2px solid black;font-family: georgia}.
    |_. Provider |_. Text Email Address|_. Verified?|
    |3 River Wireless|[email protected] |*Not Verified* |
    |ACS Wireless|[email protected] |*Not Verified* |
    |Alltel|[email protected] |*Not Verified* |
    |AT&T|[email protected] |VERIFIED |
    |Bell Canada|[email protected] |*Not Verified* |

    i.e. using inline styles?
    Post edited by Calion on
Sign In or Register to comment.

April 2024
Season of Strife

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions