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

Amir

I managed to create 'double row' for a table in Bootstrap:

<table class="table table-striped table-bordered">
    <tr>
        <th>1</th>
        <th>2</th>
        <th>3</th>
    </tr>
    <tr>
        <td>A</td>
        <td>A</td>
        <td>A</td>
    </tr>
    <tr>
        <td rowspan="2">B</td>
        <td>B1</td>
        <td>B1</td>
    </tr>

    <tr>
        <td>B2</td>
        <td>B2</td>
    </tr>
</table>

Ideally I want it to look like this: enter image description here

Playing around with colspan didn't really help, only broke things. I tried to set colspan of every row's first column to 2 and the one of B to 1, and have additional <td> for B1 and B2, didn't work.

Ramiz Wachtler

Finally I've got a solution for you :

SNIPPET

.container {
  background-color: #ccc;
}
thead{
  background:#C9E4F4;
}
table,
th,
td {
  text-align: center !important;
  border: 1.5px solid #929292 !important;
}
#text1 {
  background-color: #cac;
}
#text2 {
  background-color: #cca;
}
#navigation {
  background-color: #acc;
}
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.0/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table class="table table-bordered">
  <tr>
    <thead>
      <th colspan="2">1</th>
      <th>2</th>
      <th>3</th>
    </thead>
  </tr>
  <tr>
    <td colspan="2">A</td>
    <td>A</td>
    <td>A</td>
  </tr>
  <tr>
    <td rowspan="2">B</td>
    <td>B1</td>
    <td>B1</td>
    <td>B1</td>
  </tr>
  <tr>
    <td>B2</td>
    <td>B2</td>
    <td>B2</td>
  </tr>
</table>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Split one row into two

From Dev

Split one row into two

From Dev

Split one column into two

From Dev

Split table row into two rows

From Dev

How to split one table into two

From Dev

I’m not grasping Bootstrap’s grid with two columns to one column?

From Dev

compare two table with row and column

From Dev

sum of one row's ( two column's avg value ) and that very same row's (another column's value)

From Dev

query for join two column and get one row per left with column that have array of right table refrenced to left table row

From Dev

SQL - one row to split into two columns snake

From Dev

Compare two columns on one table row by row

From Dev

Split table row into two fields and count each

From Dev

Summing the values of one column of one row from two tables into third table

From Dev

How to split one column into two columns just by counting the characters and inserting them into another table via a SQL query?

From Dev

Split one column to two columns in R with looping

From Dev

Split one column into two columns and retaining the seperator

From Dev

How to split one column into two in SQL server?

From Dev

SQL - Split One Table to Two And Link

From Dev

SQL - Split One Table to Two And Link

From Dev

How to add two elements in one row in bootstrap?

From Dev

Make one column of a Bootstrap row scrollable

From Dev

Bootstrap table last row in specific column

From Dev

Split Table Row(s) for smaller screens

From Dev

How to get distinct results in one row from two column of same table?

From Java

Can we insert in one table and trigger to update the inserted row's one column by looking at other table's value for the id being inserted?

From Dev

Two-dimensional table with row/column highlighting

From Dev

how to get the row in some column in one table

From Dev

TSQL transform row values into one column table

From Dev

Split record from one column to two column in MysQL or PHP

Related Related

  1. 1

    Split one row into two

  2. 2

    Split one row into two

  3. 3

    Split one column into two

  4. 4

    Split table row into two rows

  5. 5

    How to split one table into two

  6. 6

    I’m not grasping Bootstrap’s grid with two columns to one column?

  7. 7

    compare two table with row and column

  8. 8

    sum of one row's ( two column's avg value ) and that very same row's (another column's value)

  9. 9

    query for join two column and get one row per left with column that have array of right table refrenced to left table row

  10. 10

    SQL - one row to split into two columns snake

  11. 11

    Compare two columns on one table row by row

  12. 12

    Split table row into two fields and count each

  13. 13

    Summing the values of one column of one row from two tables into third table

  14. 14

    How to split one column into two columns just by counting the characters and inserting them into another table via a SQL query?

  15. 15

    Split one column to two columns in R with looping

  16. 16

    Split one column into two columns and retaining the seperator

  17. 17

    How to split one column into two in SQL server?

  18. 18

    SQL - Split One Table to Two And Link

  19. 19

    SQL - Split One Table to Two And Link

  20. 20

    How to add two elements in one row in bootstrap?

  21. 21

    Make one column of a Bootstrap row scrollable

  22. 22

    Bootstrap table last row in specific column

  23. 23

    Split Table Row(s) for smaller screens

  24. 24

    How to get distinct results in one row from two column of same table?

  25. 25

    Can we insert in one table and trigger to update the inserted row's one column by looking at other table's value for the id being inserted?

  26. 26

    Two-dimensional table with row/column highlighting

  27. 27

    how to get the row in some column in one table

  28. 28

    TSQL transform row values into one column table

  29. 29

    Split record from one column to two column in MysQL or PHP

HotTag

Archive