怎么把表格定死?

代码如下:

<td style="word-break:break-all; width:100px;">
                                    <table cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td >
                                                <p>
                                                    适用车型:</p>
                                                <asp:TreeView ID="tvRelateCar" runat="server" ShowLines="true">
                                                   <SelectedNodeStyle Font-Bold="True" ForeColor="Red" />
                                                </asp:TreeView>
                                            </td>
                                        </tr>
                                        <tr id="trEngine" runat="server" visible="false">
                                            <td style="vertical-align: top;">
                                                <p>
                                                    适用发动机:</p>
                                                <asp:TreeView ID="tvRelateEngine" runat="server" ShowLines="true">
                                                  <SelectedNodeStyle Font-Bold="True" ForeColor="Red" />
                                                </asp:TreeView>
                                            </td>
                                        </tr>
                                    </table>
                                </td>

用word-break:break-all东西可以把文本定死,但是里面有个TreeView。 就搞不定了!

皈依舞
浏览 495回答 3
3回答

慕雪6442864

发布后查看TreeView生成的HTML代码中,那些样式影响了你所要达到的需求。

智慧大石

哦。第一个说的。表格是固定了!但是TREEVIEW的项超过宽度就不会显示了! 我的意思是 超过的部分换行。 相当于挤下去!
打开App,查看更多内容
随时随地看视频慕课网APP