WordPress.org

Ready to get started?Download WordPress

Forums

Trouble with Tables (9 posts)

  1. travelingbard
    Member
    Posted 3 years ago #

    I am trying use tables with Modularity-lite with the HTML table codes. The first row will appear normal and the following row will have a white rectangle covering the entire row covering text from being seen. This pattern will alternate. I tried setting a transparant background using bgcolor and style attribute with background-color but I can't get around this.

    <table border="0" cellspacing="0" cellpadding="0" width="760" style="background-color:none;">
    <tbody>
    <tr><td>the cells</td><td>on this row</td><td>look fine</td><tr>
    <tr><td>this row</td><td>has a white</td><td>screen</td><tr>
    </tbody>
    </table>

    If anyone has any suggestions I would love to hear them.

  2. Samuel B
    moderator
    Posted 3 years ago #

  3. markshawcricket
    Member
    Posted 3 years ago #

    I've just had this issue.

    My CSS was utilising a library file which set this highlighting. If you add the following to your CSS it should over ride the highlighting.

    tbody tr:nth-child(even) td, tbody tr.even td {background:transparent;}
    tbody tr:nth-child(odd) td, tbody tr.odd td {background:transparent;}

    Regards,

    Mark

  4. mikethetruthjackson
    Member
    Posted 3 years ago #

    Mark

    Where would the code go?

  5. markshawcricket
    Member
    Posted 2 years ago #

    Hi Mike,

    Sorry for the delay, I put the code in style.css

    #slideshow .slide img {
    display: block;
    max-width: 950px;
    text-align: center;
    margin: 0 auto;
    }
    tbody tr:nth-child(even) td, tbody tr.even td {background:transparent;}
    tbody tr:nth-child(odd) td, tbody tr.odd td {background:transparent;}
    /* =Navigation
    -------------------------------------------------------------- */

    Regards,

    Mark

  6. oldtimercurt
    Member
    Posted 2 years ago #

    I'm a real newby but from the code you posted, it looks like your row tag isn't being closed. </tr>

    OTC

  7. markshawcricket
    Member
    Posted 2 years ago #

    No idea mate, it works for me, just sharing the knowledge :-)

    For the avoidance of doubt the only lines I added were:

    tbody tr:nth-child(even) td, tbody tr.even td {background:transparent;}
    tbody tr:nth-child(odd) td, tbody tr.odd td {background:transparent;}

    Cheers,

    Mark

  8. You are correct OTC. The <tr> tag should always be closed with a </tr>.

    (Just posting this for future reference.)

  9. markshawcricket
    Member
    Posted 2 years ago #

    Ah, I think your talking about the original post by travelingbard?

    If so that makes more sense to me!

    Cheers,

    Mark

Topic Closed

This topic has been closed to new replies.

About this Topic