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 8762777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:37:09+00:00 2026-06-13T15:37:09+00:00

Is it possible with CSS to change the appearance of a normal table like

  • 0

Is it possible with CSS to change the appearance of a normal table like this:

+-----------+-----------+
| Row1Cell1 | Row1Cell2 |
+-----------+-----------+
| Row2Cell1 | Row2Cell2 |
+-----------+-----------+
| Row3Cell1 | Row3Cell2 |
+-----------+-----------+
| Row4Cell1 | Row4Cell2 |
+-----------+-----------+
| Row5Cell1 | Row5Cell2 |
+-----------+-----------+
| Row6Cell1 | Row6Cell2 |
+-----------+-----------+

Into this:

+-----------+-----------+-----------+-----------+
| Row1Cell1 | Row1Cell2 | Row2Cell1 | Row2Cell2 |
+-----------+-----------+-----------+-----------+
| Row3Cell1 | Row3Cell2 | Row4Cell1 | Row4Cell2 |
+-----------+-----------+-----------+-----------+
| Row5Cell1 | Row5Cell2 | Row6Cell1 | Row6Cell2 |
+-----------+-----------+-----------+-----------+

What I want to do is render two (or perhaps even three) <tr>s on the same visual row.
I would like to accomplish this without using javascript if possible.

regards Oskar

  • 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-06-13T15:37:10+00:00Added an answer on June 13, 2026 at 3:37 pm

    If you don’t know how wide your <tr>s are you can use this:

    HTML

    <table>
        <tbody>
            <tr>
                <td>1 1</td>
                <td>1 2</td>
            </tr>
            <tr>
                <td>2 1</td>
                <td>2 2</td>
            </tr>
            <tr>
                <td>3 1</td>
                <td>3 2</td>
            </tr>
            <!-- more stuff here -->
        </tbody>
    </table>
    

    CSS

    tr {
        float: left;
    }
    
    tr:nth-child(3n+1) {
        clear: left;
    }
    

    It lets the <tr>s float but breaks every now and then. You can control when this happens using the :nth-child-selector. In this case (:nth-child(3n+1)) it breaks after every third row. Using 2n+1 breaks after every second row and finally n+1 brings back your original order from the beginning. I hope this helps.

    Demo

    Try before buy

    A note: I tested this in Safari, Chrome and Firefox but not in IE – didn’t have time to start the VM.

    PS: If you know how wide your <tr>s are you can do it just with tr { float: left; } and by setting the overall width of the table so that 1, 2 or 3 rows would have enough space horizontally.

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

Sidebar

Related Questions

May be possible in css with out change HTML if yes please tell me
Is it in any way possible, to change a css class model using JavaScript?
Is it possible to change only Y value of background position in CSS? background-position-y
Okay, I know that 1) this is probably not possible with CSS alone and
I know how to use CSS to turn off or change the appearance of
Is it possible to change the CSS class of the validated control if it's
Is it possible to change the CSS class of an HTML button using JavaScript?
I want to do something like this: View <td class=status_@Model.IsActive> @Model.Description </td> CSS <style
I have a two-row table like this: --------------------------- | 1 Item | Total: $370.00
Possible Duplicate: Can .NET intercept and change css files? I have configured IIS6 to

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.