Horje Website
Bootstrap 4 Display Table Classes – Learn Display table classes – Bootstrap Code

Bootstrap 4 Display Table Classes – Learn Display table classes

Bootstrap 4 Display Table Classes - Learn Display table classes - Bootstrap Code


 
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <title>Bootstrap 4 Display Table Classes</title>
  7. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  9. <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  10. <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
  11. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
  12. <style>
  13.     .bs-example{
  14.     margin: 20px;
  15. }
  16. .bs-example div{
  17. padding: 5px;
  18. border: 1px solid #dee2e6;
  19. border-collapse: collapse;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <div class="bs-example">
  25. <h2>Display Table Classes</h2>
  26. <p>Use the d-table, d-table-row, and d-table-cell class to force an element to behave like a table, tr and td element, respectively. You can also add breakpoints (sm, md, lg, xl) to these classes (d-*-table, d-*-table-row and d-*-table-cell) to control when the element should behave like a table, row or column based on the screen width.</p>
  27. <div class="table d-table">
  28. <div class="d-table-row">
  29. <div class="d-table-cell">Cell 1</div>
  30. <div class="d-table-cell">Cell 2</div>
  31. </div>
  32. <div class="d-table-row">
  33. <div class="d-table-cell">Cell 3</div>
  34. <div class="d-table-cell">Cell 4</div>
  35. </div>
  36. </div>
  37. </div>
  38. </body>
  39. </html>



Try Your Self ->



Published:
September 23, 2020
Author:
admin
Category:
Bootstrap Basic, Bootstrap Source Code
Views:
18

This article was posted in Bootstrap Basic, Bootstrap Source Code and tagged , , . Bookmark the permalink. Follow comments with the RSS feed for this post.Post a Comment or leave a trackback: Trackback URL.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Horje © 2011 - 2023