[英]Fixed hight and width for a column table
我有一个带有多列的表,其中两个显示的不是它们应有的方式。 实际上,我希望内容适合该列。
这是我的代码
<tr>
<td>
<a style="display: block" href="../workitem/view.asp?item_id=<%=workItemId%>&hometoURL=<%=Server.URLEncode(navpath & "/de/ticket/liste_ticket_pl.asp")%>"><%=Workitem%></a>
</td>
<td background="../../images/white-dot.gif">
<img src="../../images/white-dot.gif" width="1" height="8">
</td>
<td>
<%=WorkitemRecordset.fields("Workitem_Rel")%>
</td>
</tr>
我得到的是,当我的href很短时,Workitem_Rel位于左侧,而当href很长时,它位于右侧。
编辑:这就是我得到的
col1 col2
----- | -------
长文本|文本|
这可能是从头开始。 固定在那里的宽度/高度
试试这个CSS
table td {
width: 30px;
overflow: hidden;
display: inline-block;
white-space: nowrap;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.