I have the following DL
in a container that is 300px wide.
<style type="text/css">
dl {width: 300px}
dt {
float:left;
clear: left;
width: 70px;
}
</style>
<dl>
<dt>Row1</dt>
<dd>Value1</dd>
<dt>Row2</dt>
<dd>Value2</dd>
<dt>Row3 with longer title requiring line breaks</dt>
<dd>Value 3</dd>
<dt>Row4</dt>
<dd>Value4</dd>
<dt>Row5</dt>
<dd>Value5.1</dd>
<dd>Value5.2</dd>
<dt>Row6</dt>
<dd>Value6.1</dd>
<dd>Value6.1</dd>
<dd>Value6.1</dd>
</dl>
How can I align the items to look like a table, i.e.:
- Have
DT
in the left column and theDD
s in the right column - rowX and valueX top-aligned
- Multiple
DD
s (for oneDT
) listed beneath each other
I found multiple related questions here, here and here, but with neither I managed to top-align the different situation (DT
being higher than DD
, multiple DD
s being higher than DT
).