在Html表中单词没有包含在firefox中

时间:2013-03-19 05:37:51

标签: html firefox

在html表中,文本自动包装在IE和chrome中。但Firefox它占用了更多的空间然后包裹.. firefox中的问题是什么......任何想法......?请找到下面的表格。第1列有更大的文字,包裹并占用IE和& chrome..The在firrefox中占据更多宽度

<table cellspacing="1" cellpadding="1" border="1">
        <thead>
            <tr>
                <th valign="top" align="center" colspan="5">
                    Header Col
                </th>
            </tr>
            <tr>
                <th valign="top" align="center" cell="1" id="c0">
                    Col1
                </th>
                <th valign="top" align="center" cell="2" id="c1">
                    col2
                </th>
                <th valign="top" align="center" cell="3" id="c2">
                    col3
                </th>
                <th valign="top" align="center" cell="4" id="c3">
                    col4
                </th>
                <th valign="top" align="center" cell="5" id="c4">
                    col5
                </th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td valign="top" align="left" cell="1">
                    <table cellspacing="0" cellpadding="0" border="0" class="deffont" style="width: 100%">
                        <tbody>
                            <tr>
                                <td width="15" valign="top" align="left" style="padding-bottom: 0px; margin: 0px;
                                    padding-left: 0px; padding-right: 0px; height: 100%; padding-top: 0px">
                                </td>
                                <td valign="top" align="left">
                                    <div>
                                        <div>
                                            <b><a></a><b>H-(D)p-ganeshgkdagkalyal-(D)seryl-(D)tryptophanyl-(D)seryl-(D)haninsdj-(D)cyclohexylalanyl-(D)arginyl-(D)arginyl-(D)arginyl-(D)glutaminyl-(D)arginyl-(D)arginine
                                                acetate salt</b><br>
                                                <br>
                                            </b>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td valign="top" align="left" cell="2">
                    &nbsp;
                    <div>
                        <div>
                            <br>
                            <br>
                        </div>
                    </div>
                </td>
                <td valign="top" align="left" cell="3">
                    <div>
                        <div>
                            For test in combination with test and test for the test of test with test.<br>
                            <br>
                        </div>
                    </div>
                </td>
                <td valign="top" align="left" cell="4">
                    <div>
                        <div>
                            <table cellspacing="0" cellpadding="0" border="0" class="deffont">
                                <tbody>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b></b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <br>
                        </div>
                    </div>
                </td>
                <td valign="top" align="left" cell="5">
                    <div>
                        <div>
                            DD: 12/22/11&nbsp;&nbsp;<br>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>

1 个答案:

答案 0 :(得分:0)

将此款式添加到道明:style="display: inline-block;word-break: break-all;"

<table cellspacing="1" cellpadding="1" border="1">
        <thead>
            <tr>
                <th valign="top" align="center" colspan="5">
                    Header Col
                </th>
            </tr>
            <tr>
                <th valign="top" align="center" cell="1" id="c0">
                    Col1
                </th>
                <th valign="top" align="center" cell="2" id="c1">
                    col2
                </th>
                <th valign="top" align="center" cell="3" id="c2">
                    col3
                </th>
                <th valign="top" align="center" cell="4" id="c3">
                    col4
                </th>
                <th valign="top" align="center" cell="5" id="c4">
                    col5
                </th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td valign="top" align="left" cell="1">
                    <table cellspacing="0" cellpadding="0" border="0" class="deffont" style="width: 100%">
                        <tbody>
                            <tr>
                                <td width="15" valign="top" align="left" style="padding-bottom: 0px; margin: 0px;
                                    padding-left: 0px; padding-right: 0px; height: 100%; padding-top: 0px">
                                </td>
                                <td valign="top" align="left" style="display: inline-block;word-break: break-all;">
                                    <div>
                                        <div>
                                            <b><a></a><b>H-(D)p-ganeshgkdagkalyal-(D)seryl-(D)tryptophanyl-(D)seryl-(D)haninsdj-(D)cyclohexylalanyl-(D)arginyl-(D)arginyl-(D)arginyl-(D)glutaminyl-(D)arginyl-(D)arginine
                                                acetate salt</b><br>
                                                <br>
                                            </b>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td valign="top" align="left" cell="2">
                    &nbsp;
                    <div>
                        <div>
                            <br>
                            <br>
                        </div>
                    </div>
                </td>
                <td valign="top" align="left" cell="3">
                    <div>
                        <div>
                            For test in combination with test and test for the test of test with test.<br>
                            <br>
                        </div>
                    </div>
                </td>
                <td valign="top" align="left" cell="4">
                    <div>
                        <div>
                            <table cellspacing="0" cellpadding="0" border="0" class="deffont">
                                <tbody>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <b></b>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <br>
                        </div>
                    </div>
                </td>
                <td valign="top" align="left" cell="5">
                    <div>
                        <div>
                            DD: 12/22/11&nbsp;&nbsp;<br>
                        </div>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>