我有一个已定义的列表。适用于IE7(不关心IE6)的所有内容,其中DD列保留在顶行。谁能告诉我为什么以及如何解决?感谢
<!DOCTYPE html>
<html>
<head>
<title>DL Lists</title>
<style>
dt,dd { float:left;}
dt { clear:both;}
</style>
</head>
<body>
<dl>
<dt>title for column 2</dt><dd>column 2 value</dd>
<dt>title for column 2</dt><dd> </dd>
<dt>title for column 2</dt><dd>column 2 value</dd>
<dt>title for column 2</dt><dd>column 2 value</dd>
</dl>
</body>
</html>
答案 0 :(得分:0)
<!DOCTYPE html>
<html>
<head>
<title>DL Lists</title>
<style>
dt { float:left; clear:left; width: 200px;}
</style>
</head>
<body>
<dl>
<dt>title for column 2</dt><dd>column 2 value</dd>
<dt>title for column 2</dt><dd> </dd>
<dt>longer title for column 2</dt><dd>column 2 value</dd>
<dt>title for column 2</dt><dd>longer column 2 value</dd>
</dl>
</body>
</html>