Bootstrap表列问题

时间:2016-07-10 09:42:58

标签: javascript jquery html twitter-bootstrap bootstrap-table

我需要bootstrap table css的帮助所以当我从Jquery In Bootstrap表中创建列时,我遇到了一些问题。This Picture

我的专栏滑倒了。我不想这样。我给css在我的专栏中,所以列看起来像这样。 This Picture 谁能帮我 ?

JQuery代码

var Tablo=document.getElementById("tablo_icin2");
        var tbody=document.getElementById("MyTBody");
        json_obj= $.parseJSON(veri);
        for(var i in json_obj)
        {

            var Satir=document.createElement("tr");
            var Stun=document.createElement("td");
            Stun.appendChild(document.createTextNode(" "));
            Satir.appendChild(Stun);

            //Yeni Stun Ekliyoruzz

            Stun=document.createElement("td");
            Stun.classList.add("sorting_1");
            Stun.appendChild(document.createTextNode(json_obj[i].KuryeNumarasi  ));
            Satir.appendChild(Stun);
            //Yeni Stun Ekliyoruzz

            Stun=document.createElement("td");
            Stun.appendChild(document.createTextNode(json_obj[i].TipId  ));
            Satir.appendChild(Stun);
            //Yeni Stun Ekliyoruzz

            Stun=document.createElement("td");
            Stun.appendChild(document.createTextNode(" "  ));
            Satir.appendChild(Stun);

            //Yeni Stun Ekliyoruzz
            //And More Table Rows in down.

Html代码;

<table id="tablo_icin2" class="table table-bordered  table-hover table-striped">

                <thead>
                <tr>
                  <th>
                    <span class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></span>
                  </th>
                  <th>Kurye&nbsp;Numara</th>
                  <th>Kurye&nbsp;Tipi</th>
                  <th>Kurye&nbsp;Resmi</th>
                  <th>Adı&nbsp;Soyadı</th>
                  <th>TC&nbsp;Numarası</th>
                  <th>Cinsiyeti</th>
                  <th>Doğum&nbsp;Tarihi</th>

                  <th>Açıklama</th>
                  <th>İşe&nbsp;Başlama&nbsp;Tarihi</th>
                  <th>İşten&nbsp;Ayrılma&nbsp;Tarihi</th>
                  <th>Kan&nbsp;grubu</th>
                  <th>Boyu</th>
                  <th>Kilo</th>
                  <th>Ayakkabı&nbsp;Numara</th>
                  <th>Prim&nbsp;Grubu</th>

                  <th>Durumu</th>
                  <th>Sabit&nbsp;Telefonu</th>
                  <th>GSM&nbsp;Telefonu</th>
                  <th>E-&nbsp;mail&nbsp;Adresi</th>
                  <th>Ev&nbsp;Adresi</th>
                  <th>Android&nbsp;Kullanıcı&nbsp;Adı</th>
                  <th>Android&nbsp;Kullanıcı&nbsp;Şifresi</th>
                  <th>Yakının&nbsp;Adı&nbsp;Soyadı</th>
                  <th>Tanıdık&nbsp;Telefon&nbsp;1</th>
                  <th>Tanıdık&nbsp;Telefon&nbsp;2</th>
                  <th>Tanıdık&nbsp;Adres</th> 
                </tr>
                </thead>
                <tbody id="MyTBody">

                </tbody></table>

1 个答案:

答案 0 :(得分:1)

您可以在这些特定单元格中添加一个带有空格的类

.text-nowrap {
    white-space: nowrap;
}