我有一张桌子,在笔记栏中,我应该添加长条形区域。当我添加非常长的音符时,该行扩展但我只想注意结算新行。 示例: asyufgasdfhjdasfghfghasfhaahjfsghjahfjqjwjefqfeqwhkfwq
我想要这个:
jdsaaafjasasjs
ywewyuwqfyuyew
quyduquyqewfyy
我的表格代码:(我想用'thisone'id修复td)
<div class="col-md-6">
<div class="content-box-large">
<div class="panel-heading">
<div class="panel-title">Notlar</div>
<div class="panel-options">
<a href="#" data-rel="collapse"><i class="glyphicon glyphicon-refresh"></i></a>
<a href="#" data-rel="reload"><i class="glyphicon glyphicon-cog"></i></a>
</div>
</div>
<div class="panel-body">
<table class="table table-striped">
<?php if(mysqli_num_rows($listele)>0)
{ ?>
<thead>
<tr>
<th>Tarih</th>
<th>Saat</th>
<th>Dosya Notu</th>
<th>Notu Kaydeden Kişi</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
while($not=mysqli_fetch_array($listele))
{
$tarih=$not["tarih"];
?>
<tr>
<td><?php echo date("d/m/Y",strtotime($tarih)); ?></td>
<td><?php echo date("H:i",strtotime($tarih)); ?></td>
<td id="thisone"><?php echo $not["dosya_not"]; ?></td>
<td><?php echo $not["calisan_adi"]; ?></td>
</tr>
<?php
$i++;
}
}?>
</tbody>
</table>
</div>
<div class="panel-body">
<table class="table table-striped">
<tr>
<td><input type="hidden" id="musteri_id" value="<?php echo $musteri_id; ?>"></td>
<td id="not"><textarea class="form-control" id="not_degeri" placeholder="Notu Giriniz" rows="3"></textarea></td>
<td id="buton"><button class="btn btn-primary" id="ekle">Yeni Not Ekle</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</di
v>
答案 0 :(得分:1)
您可以在CSS中使用分词选项
td {
word-break: break-all;
}
<style>
td { word-break: break-all; }
</style>
<div class="col-md-6">
<div class="content-box-large">
<div class="panel-heading">
<div class="panel-title">Notlar</div>
<div class="panel-options">
<a href="#" data-rel="collapse"><i class="glyphicon glyphicon-refresh"></i></a>
<a href="#" data-rel="reload"><i class="glyphicon glyphicon-cog"></i></a>
</div>
</div>
<div class="panel-body">
<table class="table table-striped">
<thead>
<tr>
<th>Tarih</th>
<th>Saat</th>
<th>Dosya Notu</th>
<th>Notu Kaydeden Kişi</th>
</tr>
</thead>
<tbody>
<tr>
<td>sometext</td>
<td>some text</td>
<td id="thisone">lsdfjasdklfjasldajklsdfjkldfjklafsjklasdfjlkasdfjklafjklasdfjhklasdfjhklasdfjhklasdfajklasdfjklasdfjkl</td>
<td>some text</td>
</tr>
</tbody>
</table>
</div>
<div class="panel-body">
<table class="table table-striped">
<tr>
<td><input type="hidden" id="musteri_id" value=""></td>
<td id="not"><textarea class="form-control" id="not_degeri" placeholder="Notu Giriniz" rows="3"></textarea></td>
<td id="buton"><button class="btn btn-primary" id="ekle">Yeni Not Ekle</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>