Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css html样式在MVC视图中的FF中不起作用_Css - Fatal编程技术网

Css html样式在MVC视图中的FF中不起作用

Css html样式在MVC视图中的FF中不起作用,css,Css,我有以下看法: <div style="width:600"> <fieldset style="width:600"> <table style="width:600" > <tr> <td>TEST</td> <td ><span class="displayData"><%= Html.Encode(Mode

我有以下看法:

<div style="width:600">
    <fieldset style="width:600">
    <table style="width:600" >
       <tr>
             <td>TEST</td>
             <td ><span class="displayData"><%= Html.Encode(Model.MyDESCRIPTION)%></span></td>  
             <td style="width:100%;" >&nbsp;</td>                  
             <td style="white-space: nowrap;">....</td>
             </tr>
        </table>
    </fieldset>
</div>
在IE中,该线可在600范围内弯曲成多条线。但是在Firefox中,这条线会被延长,并且没有扭曲,因此会被显示器切断。但是印刷对于FF来说是好的


我很困惑。如何解决此问题?

您需要以下CSS来强制断线:

td span {
    width: 600px;
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
}

您需要在字段集和表格标记7中为您的“样式”指定度量值“px”/“pt”/“%”等。使用style=“width:600px;max width:600px”对于所有类型,仍然会得到相同的结果。问题是:此字符串中没有空格字符。即使我将上面的风格应用于内部的跨度,仍然会得到相同的结果。在前面的问题中有一些解决方案,但似乎没有一个是完美的。
td span {
    width: 600px;
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
}