下面是我在aspx文件中的代码;
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Table ID="tblAssump" CssClass="tbl-assump" runat="server">
<asp:TableHeaderRow>
<asp:TableHeaderCell CssClass="tbl-top-header">Items</asp:TableHeaderCell>
<asp:TableHeaderCell CssClass="tbl-top-header">Assumptions and Justifications</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow CssClass="tbl-row-assump">
<asp:TableCell>1</asp:TableCell>
<asp:TableCell>RBI assessment is based on the HULL RBI Methodology, Doc. No.: GTS-RBI-FSTR-2015-R-002, Rev. 0 which has been approved by CLIENT.</asp:TableCell>
</asp:TableRow>
<asp:TableRow CssClass="tbl-row-assump">
<asp:TableCell>2</asp:TableCell>
<asp:TableCell>Tagging methodology and rule of thumb:<br /> i. From aft to forward - by framing number.<br /> ii. From port to starboard - by longitudinal number.<br />iii. From bottom keel to upper deck - by elevation and/or longitudinal<br /> number.</asp:TableCell>
</asp:TableRow>
<asp:TableRow CssClass="tbl-row-assump">
<asp:TableCell>3</asp:TableCell>
<asp:TableCell>Component setup are based on typical type of structural component used for Hull construction. Risk is eing assessed for all possible tagged components (component system, NOT global system).<br /><br />Definition of Lower, Middle and Upper Zone shall reflect client's requirement, if not the appointed consultant shall advise accordingly.</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ContentTemplate>
</asp:UpdatePanel>
这是我的CSS代码;
.div-assump {
float: left
}
.tbl-row-assump td:nth-child(1){
vertical-align: middle
}
.tbl-row-assump td:nth-child(2) {
background-color: red;
max-width: 500px;
word-wrap: break-word;
text-wrap: normal;
text-align: justify
}
出于某种原因,当我运行aspx文件时,网站结果是这样的;
我的CSS表格有问题吗?
答案 0 :(得分:0)
使用word-break: break-all;
或data-style-name
的属性,我认为它会起作用。