Skip to content

Instantly share code, notes, and snippets.

@marek-saji
Created December 20, 2012 12:32
Show Gist options
  • Save marek-saji/4345054 to your computer and use it in GitHub Desktop.
Save marek-saji/4345054 to your computer and use it in GitHub Desktop.
dt+dd in one line
/**
* dt+dd in one line
*/
article
{
width: 20em;
}
dl { margin: 1em; background: #a88; clear: both; overflow: auto; }
dl dt, dl dd { display: inline; margin: 0; padding: 0; }
dl dt { font-weight: bold; }
#a dd::after { display: block; content: '★'; }
#b dt, #b dd { float: left; }
#b dt { clear: left; }
#c dd::after { white-space: pre; content: '\A'; }
<article>
<dl id=a>
<dt>A</dt><dd>a</dt>
<dt>foo</dt><dd>Lorem ipsum, stuff blah, blah, blah and foo and bar and zar and stuff.</dd>
<dt>bar</dt><dd>ditto</dd>
</dl>
<dl id=b>
<dt>A</dt><dd>a</dt>
<dt>foo</dt><dd>Lorem ipsum, stuff blah, blah, blah and foo and bar and zar and stuff.</dd>
<dt>bar</dt><dd>ditto</dd>
</dl>
<dl id=c>
<dt>A</dt><dd>a</dt>
<dt>foo</dt><dd>Lorem ipsum, stuff blah, blah, blah and foo and bar and zar and stuff.</dd>
<dt>bar</dt><dd>ditto</dd>
</dl>
</article>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment