请问如何让文字自动换行
是这样,比如项目很多的表格,无法确定每一项内容的长度,因此希望每一项都可以自适应表格的宽度。如果长度够用,那后一项就跟在前一项的右边,如果宽度不够,那么被挤出去的一项就换倒下一行
我胡写了一段儿,可是只有Netscape才支持,IE和Opera都显示的乱七八糟……
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<!-- link href="css/basic.css" rel="stylesheet" type="text/css" /-->
<style type="text/css">
<!--
hehe {position:relative;float:left;}
-->
</style>
</head>
<body>
<table width="98%" border="0" cellpadding="0">
<tr>
<td>
<hehe>1你好你好你好你好你好</hehe>
<hehe>1你好你好你好你好你好你好你好你好你好</hehe>
<hehe>1你好你好你好</hehe>
<hehe>1你好你好你好你好你好你好你好你好你好你好你好你好你好</hehe>
<hehe>1你好你好你好</hehe>
<hehe>1你好你好你好</hehe>
<hehe>1你好你好你好你好你好你好你好你好你好</hehe>
</td>
</tr>
</table>
</body>
</html>
求救