One of the great things about definition lists is that a DD can apply to many DTs or a singe DD can have several DTs. his however can make coding columns (displaying the DTs on one side the corresponding DLs on another) a bit difficult.
I got close with the following code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Document</title>
<style type="text/css">
p, dt, dd {margin:0; padding:0;}
dt {float:left; width:12.5em; font-weight:bold; background:orange; margin-left:-14.5em; text-align:right; clear:left; margin-bottom:1em; padding:.5em}
dl { background:#ccc; overflow:hidden; padding-left:14.5em; padding-right:1em }
dd{padding-bottom:1em; }
dd+dd {padding-top:1em; border-top:1px dotted #000; margin-top:-1px;}
.cat {margin-top:2em}
dt+dd{overflow:hidden;}
</style>
</head>
<body>
<dl>
<dt>hey</dt>
<dd>ellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum
tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam
egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</dd>
<dt class="cat">hey you!!</dt>
<dt>hey</dt>
<dt>a longer definition term; terms could have that wrap.</dt>
<dd class="cat">Lorem ipsum... ellentesque habitant morbi tristique senectus et netus et malesuada fames
ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.
Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend
leo.aterials</dd>
<dd >ellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum
tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam
egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</dd>
<dt class="cat" >hey</dt>
<dd class="cat">XXellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu
libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</dd>
</dl>
</body>
</html>
it looks fine, at first, but when you extend your viewport so that the content on the DD becomes shorter than the accompanying DDs they all get out of sync. in this example, if you have a really wide screen and stretch your browser window you will see that the content of the last DD begins to look as if it goes with the second group of DTs.
This is, of course, because all of the DTs are floated left, cleared left. But floating both will not produce a column effect…
so I am curious if my only option is to use multiple DLs, which would fix the problem visually, but I feel seriously compromise the gracefulness of the code…
As always, you w insights area greatly appreciated