• We just launched and are currently in beta. Join us as we build and grow the community.

Advertise Here

Advertise Here

Advertise Here

Bootstrap Responsive Desktop Table

dipflexondem

Indexation Expert
D Rep
0
0
0
Rep
0
D Vouches
0
0
0
Vouches
0
Posts
160
Likes
180
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 200 XP
Hello guys we will teach you how to create this simple Bootstrap Responsive Desktop Table. In this tutorial you will learn how to create this simple project. I will tell you what is bootstrap, "Bootstrapping" is also used as a term for building a system using itself or more correctly, a predecessor version. We create this application uses a bootstrap script and CSS script. This projects relays to a table of data given. The table composed of Columns and Values, each columns has a data or value that responds if what column that the value specified. See the example code below.

Sample Code

Html Form
  1. <!DOCTYPE html>
  2. <html

    >
  3. <head

    >
  4. <meta

    charset

    =

    "UTF-8"

    >
  5. <title

    >

    Bootstrap Responsive Desktop Table</

    title

    >
  6. <link

    rel

    =

    "stylesheet"

    href

    =

    "css/normalize.css"

    >
  7. <link

    rel

    =

    'css/bootstrap.min.css'

    >
  8. <link

    rel

    =

    'stylesheet prefetch'

    href

    =

    'css/font-awesome.min.css'

    >
  9. <link

    rel

    =

    "stylesheet"

    href

    =

    "css/style.css"

    >
  10. </

    head

    >
  11. <body

    class

    =

    "large-screen"

    >
  12. <div

    class

    =

    "container"

    >
  13. <div

    class

    =

    "wrap"

    >
  14. <h1

    >

    Bootstrap Responsive Desktop Table</

    h1

    ><ul

    >
  15. <div

    class

    =

    "table-wrapper"

    >
  16. <table

    class

    =

    "table-responsive card-list-table"

    >
  17. <thead

    >
  18. <tr

    >
  19. <th

    >

    Column A</

    th

    >
  20. <th

    >

    Column B</

    th

    >
  21. <th

    >

    Column C</

    th

    >
  22. <th

    >

    Column D</

    th

    >
  23. <th

    >

    Column E</

    th

    >
  24. <th

    >

    Column F</

    th

    >
  25. </

    tr

    >
  26. </

    thead

    >
  27. <tbody

    >
  28. <tr

    >
  29. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  30. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  31. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  32. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  33. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  34. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  35. </

    tr

    >
  36. <tr

    >
  37. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  38. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  39. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  40. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  41. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  42. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  43. </

    tr

    >
  44. <tr

    >
  45. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  46. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  47. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  48. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  49. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  50. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  51. </

    tr

    >
  52. <tr

    >
  53. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  54. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  55. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  56. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  57. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  58. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  59. </

    tr

    >
  60. <tr

    >
  61. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  62. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  63. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  64. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  65. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  66. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  67. </

    tr

    >
  68. <tr

    >
  69. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  70. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  71. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  72. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  73. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  74. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  75. </

    tr

    >
  76. <tr

    >
  77. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  78. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  79. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  80. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  81. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  82. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  83. </

    tr

    >
  84. <tr

    >
  85. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  86. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  87. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  88. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  89. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  90. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  91. </

    tr

    >
  92. <tr

    >
  93. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  94. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  95. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  96. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  97. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  98. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  99. </

    tr

    >
  100. <tr

    >
  101. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  102. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  103. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  104. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  105. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  106. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  107. </

    tr

    >
  108. <tr

    >
  109. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  110. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  111. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  112. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  113. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  114. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  115. </

    tr

    >
  116. <tr

    >
  117. <td

    data-title

    =

    "Column A"

    >

    Value 1</

    td

    >
  118. <td

    data-title

    =

    "Column B"

    >

    Value 2</

    td

    >
  119. <td

    data-title

    =

    "Column C"

    >

    Value 3</

    td

    >
  120. <td

    data-title

    =

    "Column D"

    >

    Value 4</

    td

    >
  121. <td

    data-title

    =

    "Column E"

    >

    Value 5</

    td

    >
  122. <td

    data-title

    =

    "Column F"

    >

    Value 6</

    td

    >
  123. </

    tr

    >
  124. </

    tbody

    >
  125. </

    table

    >
  126. </

    div

    >
  127. </

    div

    >
  128. </

    div

    >
  129. </

    body

    >
  130. </

    html

    >

For the CSS Script
  1. ::

    -webkit-scrollbar {
  2. width

    :

    0.15em

    ;
  3. height

    :

    0.15em

    ;
  4. }

  5. ::

    -webkit-scrollbar-thumb {
  6. background

    :

    slategray

    ;
  7. }

  8. ::

    -webkit-scrollbar-track {
  9. background

    :

    #b8c0c8

    ;
  10. }

  11. body {
  12. scrollbar-face-color:

    slategray

    ;
  13. scrollbar-track-color:

    #b8c0c8

    ;
  14. }

  15. body,
  16. html {
  17. height

    :

    100%

    ;
  18. width

    :

    100%

    ;
  19. }

  20. body {
  21. font-family

    :

    "Roboto"

    ;
  22. }

  23. .wrap

    {
  24. display

    :

    -webkit-box;
  25. display

    :

    -webkit-flex;
  26. display

    :

    -ms-flexbox;
  27. display

    :

    flex;
  28. -webkit-box-align:

    center

    ;
  29. -webkit-align-items:

    center

    ;
  30. -ms-flex-align:

    center

    ;
  31. align-items

    :

    center

    ;
  32. -webkit-box-pack:

    center

    ;
  33. -webkit-justify-content:

    center

    ;
  34. -ms-flex-pack:

    center

    ;
  35. justify-content

    :

    center

    ;
  36. -webkit-box-orient:

    vertical

    ;
  37. -webkit-box-direction:

    normal

    ;
  38. -webkit-flex-direction:

    column;
  39. -ms-flex-direction:

    column;
  40. flex-direction

    :

    column;
  41. height

    :

    100%

    ;
  42. width

    :

    100%

    ;
  43. }

  44. body {
  45. background

    :

    #f8f8f8

    ;
  46. }

  47. button.btn

    {
  48. box-shadow

    :

    0

    2px

    3px

    rgba

    (

    0

    ,

    0

    ,

    0

    ,

    0.2

    )

    ;
  49. border

    :

    0

    ;
  50. border-radius

    :

    0px

    ;
  51. }
  52. button.btn

    i {
  53. margin-right

    :

    3px

    ;
  54. }

  55. body.large-screen

    .table-wrapper

    {
  56. max-width

    :

    800px

    ;
  57. }
  58. body.large-screen

    .card-list-table

    {
  59. background

    :

    white

    ;
  60. }
  61. body.large-screen

    .card-list-table

    tbody tr {
  62. background

    :

    transparent

    ;
  63. box-shadow

    :

    none

    ;
  64. margin

    :

    0

    ;
  65. }
  66. body.large-screen

    .card-list-table

    tbody tr:

    nth-of-type

    (

    even)

    {
  67. background

    :

    #dfdfdf

    ;
  68. }
  69. body.large-screen

    .card-list-table

    thead {
  70. display

    :

    table-header-group

    ;
  71. }
  72. body.large-screen

    .card-list-table

    thead th:

    last-child

    {
  73. box-shadow

    :

    none

    ;
  74. }
  75. body.large-screen

    .card-list-table

    thead th {
  76. border-bottom

    :

    1px

    solid

    #dfdfdf

    ;
  77. padding

    :

    12px

    24px

    ;
  78. }
  79. body.large-screen

    .card-list-table

    tbody tr {
  80. display

    :

    table-row

    ;
  81. padding-bottom

    :

    0

    ;
  82. }
  83. body.large-screen

    .card-list-table

    tbody tr:

    nth-of-type

    (

    even)

    {
  84. background

    :

    #fff

    ;
  85. }
  86. body.large-screen

    .card-list-table

    tbody td {
  87. border-bottom

    :

    1px

    solid

    #dfdfdf

    ;
  88. cursor

    :

    pointer

    ;
  89. display

    :

    table-cell

    ;
  90. padding

    :

    20px

    24px

    ;
  91. -webkit-transition:

    background

    .2s

    ease-out;
  92. transition

    :

    background

    .2s

    ease-out;
  93. vertical-align

    :

    middle

    ;
  94. }
  95. body.large-screen

    .card-list-table

    tbody td:

    after

    {
  96. display

    :

    none

    ;
  97. }
  98. body.large-screen

    .card-list-table

    tbody td:

    before

    {
  99. content

    :

    ''

    ;
  100. }
  101. body.large-screen

    .card-list-table

    tbody tr:

    hover

    td {
  102. background

    :

    #fcf3d0

    ;
  103. }

  104. .buttons

    {
  105. margin

    :

    10px

    0

    50px

    ;
  106. }

  107. .table-wrapper

    {
  108. max-width

    :

    300px

    ;
  109. width

    :

    80%

    ;
  110. margin

    :

    0

    auto

    0

    ;
  111. max-height

    :

    500px

    ;
  112. overflow-y

    :

    scroll

    ;
  113. position

    :

    relative

    ;
  114. -webkit-transition:

    all .2s

    ease-out;
  115. transition

    :

    all .2s

    ease-out;
  116. }
  117. @media

    (

    min-width

    :

    768px

    )

    {
  118. .table-wrapper

    {
  119. background

    :

    white

    ;
  120. box-shadow

    :

    0

    2px

    3px

    rgba

    (

    0

    ,

    0

    ,

    0

    ,

    0.2

    )

    ;
  121. }
  122. }

  123. .card-list-table

    {
  124. table-layout

    :

    fixed

    ;
  125. background

    :

    transparent

    ;
  126. margin-bottom

    :

    0

    ;
  127. width

    :

    100%

    ;
  128. }
  129. .card-list-table

    thead {
  130. display

    :

    none

    ;
  131. }
  132. .card-list-table

    tbody tr {
  133. box-shadow

    :

    0

    2px

    3px

    rgba

    (

    0

    ,

    0

    ,

    0

    ,

    0.2

    )

    ;
  134. background

    :

    #fff

    ;
  135. border-bottom

    :

    1px

    solid

    #dfdfdf

    ;
  136. cursor

    :

    pointer

    ;
  137. display

    :

    block

    ;
  138. padding

    :

    15px

    10px

    ;
  139. margin

    :

    0

    0

    10px

    0

    ;
  140. }
  141. .card-list-table

    tbody td {
  142. border

    :

    0

    ;
  143. display

    :

    block

    ;
  144. padding

    :

    10px

    10px

    20px

    40%

    ;
  145. position

    :

    relative

    ;
  146. }
  147. .card-list-table

    tbody td:

    first-of-type

    ::

    after

    {
  148. visibility

    :

    hidden

    ;
  149. }
  150. .card-list-table

    tbody td:

    after

    {
  151. content

    :

    ''

    ;
  152. width

    :

    calc

    (

    100%

    - 30px

    )

    ;
  153. display

    :

    block

    ;
  154. margin

    :

    0

    auto

    ;
  155. height

    :

    1px

    ;
  156. background

    :

    #dfdfdf

    ;
  157. position

    :

    absolute

    ;
  158. left

    :

    0

    ;
  159. right

    :

    0

    ;
  160. top

    :

    -6px

    ;
  161. }
  162. .card-list-table

    tbody td:

    before

    {
  163. color

    :

    rgba

    (

    0

    ,

    0

    ,

    0

    ,

    0.35

    )

    ;
  164. text-transform

    :

    uppercase

    ;
  165. font-size

    :

    .85em

    ;
  166. content

    :

    attr

    (

    data-title)

    ;
  167. display

    :

    table-cell

    ;
  168. font-weight

    :

    500

    ;
  169. height

    :

    100%

    ;
  170. left

    :

    15px

    ;
  171. margin

    :

    auto

    ;
  172. position

    :

    absolute

    ;
  173. vertical-align

    :

    middle

    ;
  174. white-space

    :

    nowrap

    ;
  175. width

    :

    40%

    ;
  176. }
  177. .card-list-table

    thead th {
  178. text-transform

    :

    uppercase

    ;
  179. font-size

    :

    .85em

    ;
  180. color

    :

    rgba

    (

    0

    ,

    0

    ,

    0

    ,

    0.35

    )

    ;
  181. letter-spacing

    :

    .5pt

    ;
  182. }

Don't forget to Like and Share. Enjoy Coding.


Download
You must upgrade your account or reply in the thread to view the hidden content.
 

452,496

342,218

342,226

Top