English 中文(简体)
在火狐中如何进行换行?
原标题:
  • 时间:2009-03-03 03:35:42
  •  标签:

I am building new site FF and IE compliant...what is best way to have sentences wrap to fill container in firefox? This works in IE without any problem.

Currently I am using the following doctype <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

谢谢 (xièxiè)

最佳回答

尝试了一个测试案例:

<!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在某些地方被覆盖了。

问题回答

请尝试将以下内容添加到您的CSS中。

#container {overflow: auto;}

或者

#container {overflow: hidden;}

你可能是指类似的东西

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

我认为单词之间并没有什么控制性:它们总是在必要时发生。





相关问题
热门标签