【发布时间】:2014-04-24 04:34:56
【问题描述】:
<table class="project-table">
<thead>
<tr class="align-top">
<td class="short-col heading">Project Name</td>
<td class="short-col heading align-center">Project Id</td>
<td class="short-col heading">Date & Time</td>
<td class="short-col heading">Student</td>
</tr>
</thead>
<tbody>
<tr class="bottom-row-dashed">
<td class="long-col">
<div class="achievement-box float-left">Winner</div>
<div class="float-left margin-left">Intrusion Detection System in Cloud Architecture</div>
<div class="clear"></div>
</td>
<td class="short-col align-center">1</td>
<td class="short-col">01 Apr 2014, 09:30 PM</td>
<td class="short-col">Sayan Chowdhury</td>
</tr>
<tr>
</tr></tbody>
</table>
手写笔文件:
table.project-table
font-size: 13px
margin-top: 10px
width: 100%
border-collapse: collapse
.bottom-row-dashed
border-bottom: 1px dashed border-color
.margin-right
margin-right: 2px
.margin-left
margin-left: 2px
td
&.short-col
width: 1%
&.large-col
width: 20%
&.medium-col
width: 10%
tr
&.align-top
vertical-align: top
包含“Winner”和“Intrusion Detection System in Cloud Architecture”的 div 向左浮动。我添加了word-wrap:break-word;,但它无助于打破“云架构中的入侵检测系统”一词。 short-col 和 long-col 类定义表格列的宽度
如何根据宽度打破“云架构中的入侵检测系统”一词?
编辑:我想在同一行有“云架构中的入侵检测系统”和“赢家”,但是这个词应该根据宽度在中间中断
【问题讨论】:
-
发布你的 CSS。如果可以,请发布一个 jfiddle。
-
还有一个错字
类 试试max-width??
标签: html css html-table