My goal is to create a table layout as shown below:
[ header ] [ header 2 ] [ header 3 ]
----------------------------------------------------------------------100%
cell here and longer and even longer
----------------------------------------------------------------------100%
another row here
----------------------------------------------------------------------100%
In the example above, I am aiming for a table with a width of 100%
, allowing the striped table rows (i.e.
<table class="table table-striped">
) to span the entire width. However, I need all content to be left-aligned and occupy only the necessary space. I have experimented with different CSS styles such as:
table.something thead th { width: auto !important }
table.something thead th { white-space: nowrap; width: 1%; }
table.something tbody td { white-space: nowrap; width: 1%; }
This customization is required by a specific design specification that has to be adhered to. Otherwise, I would simply stick with the standard Bootstrap table formatting.