Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Need to create a space between every other table row via CSS

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #146975
    globalnerds
    Participant

    I have a table as follows:

     <table class="menutables">
             <tbody>
             <tr>
                <td >Row 1</td>
             </tr>
             <tr>
                <td > Row 2</td>
        </tr>
        <tr>
            <td >Row 3</td>
        </tr>
        <tr>
            <td >Row 4</td>
        </tr>
    
        </tbody>
        </table>
    

    This is the CSS related to it:

     .menutables { width: 95%; font-size: 25px; padding: 10px; font-family: 'Lobster Two',Arial,sans-serif; letter-spacing: 1px; border-bottom:10px; border-collapse: separate; }
    
        .menutables { padding:15px; } 
        .menutables td:nth-child(even) { border: 110px solid black; } 
        .menutables td:nth-child(odd) { border: 110px solid black; } 
        .menutables tr:nth-child(even) { font-size:16px; font-family: Arial,sans-serif; font-style: oblique;
    
        } 
    

    I need to create a space between every other row (the table only has 1 column).

    This table styling will be used throughout the site with tables with numerous rows. I would like to avoid setting a class for each row (tr).

    Any ideas??

    #146978
    Paulie_D
    Member

    110px border?

    Really?

    #146984
    globalnerds
    Participant

    I was testing to see if that would work (easier to see via a browser). It didn’t. I have removed that from the code

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.