2017-04-11 3 views
-2

Ich habe Tabelle, die 15 Spalten hat, so dass die Tabelle nicht ordentlich aussehen und Wert in der Spalte dauerte mehr als 1 Zeile in der BoxTabellenbreite ändern

Wie die Tabellenbreite zu erweitern oder zu Tisch, um etwas anderes zu machen, so wird der Wert in der Tabelle sehen Sie aufgeräumter aus und benutzen Sie einfach 1 Linie der Box?

Ausblick:

<table class="table"> 
    <tr> 
     <th> a </th> 
     <th> b </th> 
     <th> c </th> 
     <th> d </th> 
     <th> e </th> 
     <th> f </th> 
     <th> g </th> 
     <th> h </th> 
     <th> i </th> 
     <th> j </th> 
     <th> k </th> 
     <th> l </th> 
     <th> m </th> 
     <th> n </th> 
     <th> o </th> 
     <th>Actions</th> 
    </tr> @foreach (var item in group) { 
    <tr> 
     <td> aa </td> 
     <td> bb </td> 
     <td> cc </td> 
     <td> dd </td> 
     <td> ee </td> 
     <td> ff </td> 
     <td> gg </td> 
     <td> hh </td> 
     <td> ii </td> 
     <td> jj </td> 
     <td> kk </td> 
     <td> ll </td> 
     <td> mm </td> 
     <td> nn </td> 
     <td> oo </td> 
     <td> actions </td> 
    </tr> 
</table> 

Antwort

1

Verwenden Sie einfach folgende CSS für diese

.table th, .table td { 
    white-space: nowrap; 
} 
0

hinzufügen th und tdwhite-space:nowrap Eigenschaft.

Verwandte Themen