Split table row into two rows

Maysam

Is there any way to split a table row into two rows instead of using nested tables?

It's what I want:

my table

td #4 should has full width and I don't know is there any CSS trick or anything to do this or not.

NOTE: I do not want to use another <tr> with colspan. I want it inside the same row within other <td>s, because I'm using striped table.

Mr. Alien

As you updated your question, another way you can do is to use nested div elements, with display: table-cell; properties

.top_row {
    display: table;
    width: 100%;
}

.top_row > div {
    display: table-cell;
    width: 50%;
    border-bottom: 1px solid #eee;
}

Demo

Note: Yes, you can float the div as well, which I will prefer more over here, with a self clearing class but I used display: table-cell; so it will retain the properties like vertical-align: middle; which you may need as you are using table


Why not use colspan for this?

Demo

<table border="1" width="100%">
    <tr>
        <td>Hello</td>
        <td>World</td>
    </tr>
    <tr>
        <td colspan="2">Merged</td>
    </tr>
</table>

Note: Am using border and width attributes here just for demonstration purpose, consider declaring a class and style it using CSS

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

R - Split data frame row into two rows

From Dev

R split each row of a dataframe into two rows

From Dev

How to split row into two rows in MS SQL

From Dev

R split each row of a dataframe into two rows

From Dev

Split Table rows over two Tables

From Dev

Split table row into two fields and count each

From Dev

Changing table row color per two rows

From Dev

Changing table row color per two rows

From Dev

How to split 4 columns, one row into 2 columns, two rows?

From Dev

How to split a row into multiple rows between two given dates?

From Dev

How to split Dataframe row into two rows for a given condition -python

From Dev

Split comma separated string table row into separate rows using TSQL

From Dev

How to insert one row of a table into two rows of another table

From Dev

Can a break/split a Row in sql into two different rows and display them as two rows

From Dev

Bootstrap table - split one of the row's column in two

From Dev

jQuery split a table into two tables at a particular row number

From Dev

jQuery split a table into two tables at a particular row number

From Dev

Split a row into two halves?

From Dev

Query to split a row into two

From Dev

Split one row into two

From Dev

Split a row into two halves?

From Dev

Split one row into two

From Dev

Split table rows into columns

From Dev

Make one row in result table from two rows in SQLite

From Dev

MySQL select row with two matching joined rows from another table

From Dev

How to delete all but first two rows in a table (headers is the first row)

From Dev

See if two table rows exist, inner joined to another row

From Dev

Selecting two rows from another table using one row

From Dev

Fetch single row from two rows of a table with join in SQL Server

Related Related

  1. 1

    R - Split data frame row into two rows

  2. 2

    R split each row of a dataframe into two rows

  3. 3

    How to split row into two rows in MS SQL

  4. 4

    R split each row of a dataframe into two rows

  5. 5

    Split Table rows over two Tables

  6. 6

    Split table row into two fields and count each

  7. 7

    Changing table row color per two rows

  8. 8

    Changing table row color per two rows

  9. 9

    How to split 4 columns, one row into 2 columns, two rows?

  10. 10

    How to split a row into multiple rows between two given dates?

  11. 11

    How to split Dataframe row into two rows for a given condition -python

  12. 12

    Split comma separated string table row into separate rows using TSQL

  13. 13

    How to insert one row of a table into two rows of another table

  14. 14

    Can a break/split a Row in sql into two different rows and display them as two rows

  15. 15

    Bootstrap table - split one of the row's column in two

  16. 16

    jQuery split a table into two tables at a particular row number

  17. 17

    jQuery split a table into two tables at a particular row number

  18. 18

    Split a row into two halves?

  19. 19

    Query to split a row into two

  20. 20

    Split one row into two

  21. 21

    Split a row into two halves?

  22. 22

    Split one row into two

  23. 23

    Split table rows into columns

  24. 24

    Make one row in result table from two rows in SQLite

  25. 25

    MySQL select row with two matching joined rows from another table

  26. 26

    How to delete all but first two rows in a table (headers is the first row)

  27. 27

    See if two table rows exist, inner joined to another row

  28. 28

    Selecting two rows from another table using one row

  29. 29

    Fetch single row from two rows of a table with join in SQL Server

HotTag

Archive