【发布时间】:2016-05-03 03:04:57
【问题描述】:
当文本过多时,我使用引导程序有下表:
在推动行的大小之前,它会将列向下推,甚至没有接近填充整个区域...另外,文本与自身不对齐。我在 css 中尝试了 text-align 来解决这个问题,但在那里没有找到答案。
这里是乱七八糟的代码,没有添加只是通用的:
<div class="container">
<table class="table">
<thead>
<tr>
<th>Event</th>
<th>Last Ran</th>
<th>Next Run</th>
<th>Options</th>
<th>Details</th>
</tr>
</thead>
<tbody>
@foreach (PIM5.Web.Models.Event evt in Model.Events)
{
<tr class=@evt.status>
<td><b>@evt.name</b></td>
<td>@evt.lastRan</td>
<td>@evt.nextRun</td>
<td style="max-width: 150px">
@if (evt.options > 0)
{
<button type="button" class="btn btn-success" onclick="doProcessStart('@evt.name')">Start</button>
<button type="button" class="btn btn-warning" onclick="doProcessStop('@evt.name')">Stop</button>
<button type="button" class="btn btn-info" onclick="doProcessEdit('@evt.name')">Edit</button>
}
@if (evt.options > 1)
{
<button type="button" class="btn btn-success">Force</button>
}
<button type="button" class="btn btn-danger" onclick="doProcessRemove('@evt.name')">Remove</button>
</td>
<td>@evt.description</td>
</tr>
}
</tbody>
</table>
<button class="btn btn-success" onclick="doAddEvent()">New Event</button>
</div>
在下推行之前先填充黑框区域并且永远不要增加行宽并离开屏幕
愿意使用 javascript 或任何可以解决此问题的方法。
【问题讨论】:
-
每列固定宽度
-
固定宽度不适合移动设备 - 使用 % 宽度 - 在这种情况下,尽管使用引导列,因为已经使用引导
标签: javascript html css