Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 table overflow out of panel

I'm using bootstrap table inside a panel, which is overflow outside of panel if contains long information, how can it be fix?

enter image description here

<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>

like image 628
conmen Avatar asked Apr 10 '14 04:04

conmen


1 Answers

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

like image 96
Zim Avatar answered Oct 14 '22 22:10

Zim