I'm using bootstrap table inside a panel, which is overflow outside of panel if contains long information, how can it be fix?
<div class="col-sm-3" role="complementary">
<div class="panel panel-default">
<div class="panel-body table-responsive">
<table class="table table-bordered table-condensed f11">
<tr>
<td colspan="2" align="center" class="info"><b>Info</b></td>
</tr>
<tr>
<td width="35%"><b>Agent</b></td>
<td width="65%">Luckystar Auto</td>
</tr>
<tr>
<td><b>WhatsApp</b></td>
<td>5412876542</td>
</tr>
<tr>
<td><b>WeChat</b></td>
<td>Luckystar88899</td>
</tr>
<tr>
<td><b>Facebook</b></td>
<td>www.facebook.com/luckystar88899-abcd</td>
</tr>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<p><div id="map-canvas"></div></p>
</div>
</div>
It will happen since the url link is too wide.
A workaround is to use CSS ellipsis to truncate the cell contents as needed:
.table {
table-layout:fixed;
}
.table td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
Demo: http://bootply.com/128979
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With