making column widths equal

Kurayami
Kurayami
edited June 2010 in Campaign Portal Building
When making a table using the textile formatting, the width of the columns automatically change depending on the length of the text within the cells of the column. I'm trying to create a table where the column widths are equal regardless of inputted text. I've found some things on HTML, but I'm writing mostly in textile and haven't found a way to input cell width. Is there a way to create a table with equal width columns using textile?

I appreciate any help or tips.

Comments

  • gnunn
    gnunn
    Posts: 423
    I don't know if you can automatically make all widths equal, but you can definitely set column widths manually, by entering a {width:##px} attribute into the formatting for the cells in the first row like so...


    |{width:50px}. Cell1 |{width:100px}. Cell 2 |{width:150px}. Cell 3 |
    | Cell 4 | Cell 5 | Cell 6 |
    | Cell 7 | Cell 8 | Cell 9 |
  • gnunn
    gnunn
    Posts: 423 edited June 2010
    Ah! You can also enter a % of total table width into the cell modifier.

    eg.

    |{width:25%}. Cell1 |{width:25%}. Cell2 |{width:25%}. Cell3 |{width:25%}. Cell4 |
    | Cell 5 | Cell 6 | Cell 7 | Cell 8 |
    Post edited by gnunn on
  • Kurayami
    Kurayami
    Posts: 3
    Thank you! That helped immensely!
  • Fluke
    Fluke
    Posts: 16
    I tried applying this to my character sheet, to reduce the overall width of my tables, so I could add in a sidebar without everything getting messed up and when I saved the changes it just displayed the code on the browser page; how would I insert this into the following code to restrict the overall width?

    table{border:1px solid black}.
    |\4={background:#000}. %{color:#ffffff}**Statistics**%|
    |\2=.Lineage: Muzri|\2=.House: Kanjim|
    |\2=.Nationality: Tishinian|\2=.Profession: Honor Guard|
    |\2=.Social Standing: Sunborn/Mid|\2=.Jenu: Crocodile|
    |Age: 53|Height: 5'10"|Weight: 820lb|Sex: Male|
    |\4=.Distinguishing Marks: Dyed Battle Scars|
    |\4=.Habitual Mannerisms: Belches at inappropriate times, Overconfident, Craves Rotten Meat|
    |\4=.Common Attire: Mostly drab-colored body wraps underneath Chitin armor plates when on duty or traveling|
    |\4=.House Dress: Brightly-colored body wraps and sashes with linen hand and foot wraps|
  • Kurayami
    Kurayami
    Posts: 3
    After "table", put width:##px before the border and separate with semi-colons. Like this:

    table{width:500px;border:1px solid black}.

    Then if you want to control the widths of each individual column put it inside the vertical lines as explained by gnunn above.
  • Fluke
    Fluke
    Posts: 16
    Awesome! Many thanks!
  • Fluke
    Fluke
    Posts: 16
    Worked like a charm! "My Character":http://www.obsidianportal.com/campaigns/house-kanjim/characters/ony-kachi-bahij I'll be updating the rest of my characters with this new knowledge, too! ;-D
Sign In or Register to comment.

May 2024
The World of Elurah

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