1. how to make word-break on firefox using css
Use the following rules together:
/* For Firefox */
white-space: pre-wrap;
word-break: break-all;
/* For Chrome and IE */
word-wrap: break-word;
2. 为什么我的form没有高度和宽度
form中包含表格,但调试时form却没有高度和宽度,你的table是不是添加了align属性?
在 HTML 4.01 中,不赞成使用 body 元素的 align 属性;在 XHTML 1.0 Strict DTD 中,不支持 body 元素的 align 属性。
请使用 CSS 代替。
CSS 语法:<table style="float:right">
3. firefox fieldset
firefox 中 fieldset的样式与IE不一致,宽度会随其内容扩展,需要按如下修改CSS:
fieldset {
display : table - column ;
*display : block ;
}
但这样处理在chrome中仍有问题,更好的解决办法是设置其内容宽度。
<fieldset>
<legend>hello coco</legend>
<div id="content">
...
</div>
</fieldset>
$(document).ready(function() {
$("#content").width($(window).width() - 10);
});
$(window).resize(function() {
$("#content").width($(window).width() - 10);
});