Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6993689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:47:47+00:00 2026-05-27T19:47:47+00:00

I am targeting Chrome and other CSS3 compliant browsers and would like to have

  • 0

I am targeting Chrome and other CSS3 compliant browsers and would like to have border separation for every other row.
The CSS I currently have working for every row looks like this-

table{
  border-collapse:separate;
  border-spacing: 0px 3px;
}
td{
    border: 1px solid black;
    padding: 5px;
}

What I would like to achieve is this:

CSS

table{
  border-collapse:separate;
}
table tr:nth-of-type(odd){
  border-spacing: 0px 3px;      
}
td{
    border: 1px solid black;
    padding: 5px;
}

HTML

<table>
    <tr>
        <td>a-one</td><td>a-two</td><td>a-three</td>
    </tr>
    <tr>
        <td>a-four</td><td>a-five</td><td>a-six</td>
    </tr>
    <tr>
        <td>b-one</td><td>b-two</td><td>b-three</td>
    </tr>
    <tr>
        <td>b-four</td><td>b-five</td><td>b-six</td>
    </tr>
    <tr>
        <td>c-one</td><td>c-two</td><td>c-three</td>
    </tr>
    <tr>
        <td>c-four</td><td>c-five</td><td>c-six</td>
    </tr>       
</table>

The data is in two row sets and needs to be connected, whereas different sets need to be separated. I would like to keep it in table form to take advantage of the browsers auto-column widths. It seems like border-spacing can only be achieved on the table level. I am already using borders for styling so transparent borders is not a viable option.
Any chance for me- or I am I stuck?
JS-fiddle here identical to above here: http://jsfiddle.net/sSba4/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:47:48+00:00Added an answer on May 27, 2026 at 7:47 pm

    I’d argue that if the data needs to be visually chunked in separate containers, perhaps the most semantic solution would involve using multiple tables.

    However, if you want to keep everything in a single table for whatever reason, then you would need to introduce non-semantic markup to create those visual separations, as border-spacing is a property of the table, not of the row or cell.

    <table>
        <tr><th></th></tr>
        <tr>
            <td>Apples</td>
            <td>$3.50</td>
        </tr>
        <tr>
            <td>Oranges</td>
            <td>$2.46</td>
        </tr>
        <tr><th></th></tr>
        <tr>
            <td>Pears</td>
            <td>$2.10</td>
        </tr>
        <tr>
            <td>Apples</td>
            <td>$3.50</td>
        <tr><th></th></tr>
        <tr>
            <td>Oranges</td>
            <td>$2.46</td>
        <tr>
    
            <td>Pears</td>
            <td>$2.10</td>
        </tr>
    </table>
    

    CSS

    table {
      border-collapse:collapse;
    }
    
    table tr td {
      border: solid #ccc 1px;
      padding: 5px 7px;
    }
    
    table tr th {
      border: none;
      padding-top: 5px;
    }
    

    See it in action here http://jsfiddle.net/wYCNg/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am targeting 1.6 but I would like to have nice widget that can
Goal I am building an Eclipse plugin targeting the 3.7 environment and would like
My program is targeting Android 1.5. I would like to retrieve system information about
I'm developing some cross platform software targeting Mono under Visual Studio and would like
I currently have an Android application targeting version 11 of the SDK with a
You're stuck with targeting .NET 2.0 in Visual Studio 2008, but you'd like to
I have a phonegap application targeting iPad that needs to embed a video on
I am targeting google chrome. Is it possible to draw transparent images on a
If you're only targeting Firefox, Opera, and Chrome, not IE, and you're only targeting
I have an application targeting the 2.0 .NET framework. The solution is using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.