Turn table rows into columns with css

Asked

Viewed 427 times

0

I have a question/problem here. I wonder if you can help me. I have a table, composed of tbody, tr and td, but I would like to turn the rows into columns, only I need you to stay for example 3 records per row let’s say, in the third, it breaks and starts a new row of records, because as I can have 3, I may have 12.15.8...and so on. Here comes the doubt, I can do it with the display property ?

The code of the table is:

<th>
    <tr>
        <td>1</td>
    </tr>
</th>
<tr>
    <td>2</td>
</tr>
  • 2

    Welcome to Stack Overflow in English @Diegoaraujo . You can post the relevant code along with your question?

  • The table code is simple. <th><tr><td>1<td></tr><th><tr><td>2<td></tr> so I want to turn the rows into columns.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.