在FF帮助中自动换行/休息?

时间:2009-03-03 03:35:42

标签: css internet-explorer firefox

我正在建立新的网站FF和IE兼容...什么是让句子包装在Firefox中填充容器的最佳方法? 这在IE中没有任何问题。

目前我正在使用以下doctype <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

感谢

3 个答案:

答案 0 :(得分:1)

试过一个测试用例:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style>
.articleContent { width:200px;
}
</style>
</head>
<body>
<table><tr><td> <div class="articleContent" > this is a sentence that goes on and on. this is a sentence that goes on and on. this is a sentence that goes on and on. this is a sentence that goes on and on. this is a sentence that goes on and on. </div> </td></tr></table>
</body>
</html>

在FF / konq中渲染得很好。听起来你的CSS在某个地方被覆盖了。

答案 1 :(得分:0)

尝试将以下内容添加到CSS中

#container {overflow: auto;}

或者

#container {overflow: hidden;}

答案 2 :(得分:0)

你可能有些意思

div.mydiv {
    width: 400px;
    height: auto;
    text-align: justify;
    overflow: hidden;
}    

我认为在单词之间没有任何控制中断:它们总是在必要时发生。

相关问题