How can I remove the zebra striping from my Tables?

AmberIcon
AmberIcon

This how can I get rid of this? I am trying to format some of my pages with columns and I know that tables are a way to get around the limits of word processors and text formatting, but I cannot figure out how to make a table that does not zebra stripe.

Comments

  • Jim_Mount
    Jim_Mount
    Posts: 162

    This is what I have in my CSS for transparent backgrounds and borders



     


    #content table {background-color: transparent; border-style: none;}
    #content tr:nth-child(even) {background-color: transparent;}

    Hope it helps :)

  • AmberIcon
    AmberIcon
    Posts: 5

    I honestly don't even know how I should apply that code. Am I trying to insert that when I use the source text editing tool? If so where?

    I have this for my current table.


    <table class="{background-color:" transparent="">
    <tbody>
    <tr>
    <th colspan="2">Important Player and Character Information</th>
    </tr>
    <tr>
    <td>Pantheons</td>
    <td style="text-align: right;">The Gifts of the Scion</td>
    </tr>
    <tr>
    <td>House Rules</td>
    <td style="text-align: right;">Character Creation</td>
    </tr>
    <tr>
    <td colspan="2" style="text-align: center;">Helpful Information</td>
    </tr>
    <tr>
    <td>The Mortal World</td>
    <td style="text-align: right;">Bestiary</td>
    </tr>
    <tr>
    <td>Organizations</td>
    <td style="text-align: right;">Timeline</td>
    </tr>
    </tbody>
    </table>

    Or am I supposed to be inserting it in the table properties in the advanced tob?

  • Jim_Mount
    Jim_Mount
    Posts: 162

    If you are Ascendant then you place it in your Custom CSS field in settings/advanced-settings.

  • AmberIcon
    AmberIcon
    Posts: 5

    OH SNAP! I have been agonizing over using the in site text editor. SHIT this is game changing thanks for pointing out my oversight! 

  • Jim_Mount
    Jim_Mount
    Posts: 162 edited September 2016

    Oh, and then you would make your tables on your pages using Textile instead of all that jibber-jabber ;)

    Like so


    table.
    | name | age | class |
    | Jughead | 17 | barbarian |
    | Archie | 16 | bard |
    | Betty | 16 | rogue |
    | Veronica | 16 | wizard |

     

    Post edited by Jim_Mount on
  • AmberIcon
    AmberIcon
    Posts: 5

    I'm sorry, but does that require more CSS code? Because that isn't working for me right now.

  • Jim_Mount
    Jim_Mount
    Posts: 162 edited September 2016

    Rats! I forgot... Try putting "table." on the line directly above your table. Don't forget the period. I edited my helpful advice (⸮) in the previous post. Well, my heart was in the right place.

    EDIT: Then I edited this post again because I forgot about the period. I suck. Carry on.

    Post edited by Jim_Mount on
  • UselessTriviaMan
    UselessTriviaMan
    Posts: 546

    I change the table colors all the time.

     


    table{border:1px solid black}.
    {background:#aca}. |\5. *THE BASICS OF PTOLUS* |
    {background:#eee}. |_. [[Languages]] |_. [[Game Rules | 5E Rules]] |_. [[Technology]] |_. [[Firearms]] |_. [[Homebrew]] |
    {background:#aca}. |\5. *THE WORLD OF PTOLUS* |
    {background:#dda}. |_. [[Praemal | Praemal (the planet)]] |_. [[The Known World]] |_. [[Religions | The Gods]] |_. [[The Ptolus Year]] |_. [[Magic of Ptolus | Magic]] |

     


    Ptolus, City by the Spire - 2016 Campaign of the Year

    "Please pay attention very carefully, because this is the truest thing a stranger will ever say to you: In the face of such hopelessness as our eventual, unavoidable death, there is little sense in not at least TRYING to accomplish all your wildest dreams in life."  - - Kevin Smith

  • SkidAce
    SkidAce
    Posts: 830

    I like setting up the standard colors that fit my theme in the CSS so I dont have to type code when I make a table.  

  • Calion
    Calion
    Posts: 144

    So…did the zebra striping disappear for everyone, or did I do something? I liked the zebra striping on some of my tables, but now it doesn't seem to exist anymore.

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