Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
Created April 5, 2012 16:48
Show Gist options
  • Save mattintosh4/2312467 to your computer and use it in GitHub Desktop.
Save mattintosh4/2312467 to your computer and use it in GitHub Desktop.
dt + dt{
margin:-1em 0 1em;
}
p{
margin:1em 0;
}
dl{
margin:1em 0;
}
dt{
margin:1em 0;
}
dd{
margin:-1em 0 1em 40px;
}
<dl>
<dt>list title 1</dt>
<dd>
<p>list description 1 paragraph 1</p>
<p>list description 1 paragraph 2</p>
</dd>
<dt>list title 2</dt>
<dd>
<p>list description 2 paragraph 1</p>
</dd>
<dt>list title 3</dt>
<dd>
list description 3 (no paragraph)
</dd>
<dt>list title 4</dt>
<dd>
list description 4 (no paragraph)
</dd>
</dl>
dl,dt,dd{
margin:1em 0
}
dt + dt,dd{
margin-top:-1em
}
dd{
margin-left:40px
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment