1
下面是我在aspx文件中的代碼;asp:表長文本包裝
<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表?
的問題是不是在上面的代碼片段。當我測試它時,表中的句子像你期望的那樣分佈在多行中。 – VDWWD
我對Chrome和IE11都進行了測試......仍然與上述問題相同 – Fahmieyz