I am using the Bulma CSS framework and specifically I am trying to make the table in it responsive.
I have tried giving it a width: 100%;
and applying overflow-x: auto;
but it doesn't seem to work. Here is the demo: http://104.236.64.172:8081/#/pricing
Code:
<div class="panel-block">
<table class="table is-bordered pricing__table">
<thead>
<tr>
<th>Travellers</th>
<th>Standard</th>
<th>Delux</th>
<th>Premium</th>
<th>Luxury</th>
</tr>
</thead>
<tbody>
<tr>
<td>Per Person Cost</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
</tr>
<tr>
<td>
Extra Person <br>
(> 12 yrs)
</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
</tr>
<tr>
<td>
Extra Child <br>
(> 12 yrs)
</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
</tr>
<tr>
<td>Total Cost</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
<td>₹ 70,523.90</td>
</tr>
</tbody>
</table>
</div>
Relevant CSS:
.pricing__table {
width: 100%;
overflow-x: auto;
}