nowrap这个属性在排版或打印的定位很有用的

来源:互联网 发布:unity优化方案 编辑:程序博客网 时间:2024/05/22 06:28

           代码1:  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                                            <tr>
                                                <td width="6%"  class="td1" nowrap>
                                                    &nbsp;&nbsp;&nbsp;姓名:</td>
                                                <td width="16%" align="left" class="td1">
                                                    <%=XingMing %></td>
                                                <td width="3%"  class="td1">
                                                    &nbsp;</td>
                                                <td width="6%" align="right"  class="td1" nowrap>
                                                    性别:</td>
                                                <td width="3%" align="left"  class="td1">
                                                    <%=XingBie %></td>
                                                <td width="3%"  class="td1">
                                                    &nbsp;</td>
                                                <td width="15%" align="right" class="td1" nowrap>
                                                    年龄:</td>
                                                <td width="6%" align="left"  class="td1" nowrap>
                                                    <%=NianLing %></td>
                                                <td width="27%" align="left"  class="td1">
                                                    &nbsp;<%=TiZhong %>
                                                </td>
                                            </tr>
                                        </table>

            代码2:。<td style="white-space: nowrap;" colspan="2" align="left"></td>