2

我有一个已定义的列表。适用于除 DD 列仍位于顶行的 IE7(不关心 IE6)以外的所有内容。谁能告诉我为什么以及如何解决?谢谢

<!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>&nbsp;</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>
4

1 回答 1

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>&nbsp;</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>
于 2013-03-29T12:29:37.127 回答