Html td数据不是单行的
在我的网页中,td不是单行的Html td数据不是单行的,html,css,asp.net,Html,Css,Asp.net,在我的网页中,td不是单行的 XYZ的周报有两行,我需要一行 为什么标签内容会出现在下一行 o/p 每周报告 测试项目 desired o/p Weekly Report for <LabelData> <td align="center" style="width: 100%; color: black; font-size: 12pt; font-`enter code here`family: Trebuchet MS; font-
XYZ的周报有两行,我需要一行 为什么标签内容会出现在下一行 o/p 每周报告 测试项目
desired o/p
Weekly Report for <LabelData>
<td align="center" style="width: 100%; color: black; font-size: 12pt; font-`enter code here`family: Trebuchet MS;
font-style: italic; background: #E4AFC1; height: 5px;white-space:nowrap">
<b>Weekly Report for <asp:Label ID="lblPro" runat="server"></asp:Label></b>
</td>
所需的o/p
每周报告
每周报告
试试看
看看这是不是你想要的
看看这是不是你想要的使用
空白:nowrap
<td style="white-space: nowrap; width: 100%; color: black; font-size: 12pt; font-family: Trebuchet MS; font-style: italic; background: #E4AFC1; height: 50px;">
<b>Weekly Report for <asp:Label ID="lblPro" runat="server"></asp:Label></b>
</td>
每周报告
使用空白:nowrap
<td style="white-space: nowrap; width: 100%; color: black; font-size: 12pt; font-family: Trebuchet MS; font-style: italic; background: #E4AFC1; height: 50px;">
<b>Weekly Report for <asp:Label ID="lblPro" runat="server"></asp:Label></b>
</td>
每周报告
您的表必须响应。
如果您将td放在没有响应的表格中,您的td宽度将尝试在固定的最大表格宽度内扩展100%。参见以下示例:
走错路
<table width="80px">
<td width="100%">Weekly Report for Testing project</td>
</table>
测试项目周报
正道
<table width="100%">
<td width="30%">collumn 1</td>
<td width="40%">collumn 2</td>
<td width="30%">collumn 3</td>
</table>
合谋1
合谋2
共谋3
您的表必须响应。
如果您将td放在没有响应的表格中,您的td宽度将尝试在固定的最大表格宽度内扩展100%。参见以下示例:
走错路
<table width="80px">
<td width="100%">Weekly Report for Testing project</td>
</table>
测试项目周报
正道
<table width="100%">
<td width="30%">collumn 1</td>
<td width="40%">collumn 2</td>
<td width="30%">collumn 3</td>
</table>
合谋1
合谋2
共谋3
对不起,没有更改。尽管我使用了空白:对不起,没有变化。即使我使用了空白:nowrap