Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display DL like a table [duplicate]

How to style definition list items to have each definition in one line?

HTML:

<dl>
    <dt>word</dt><dd>meaning</dd>
    <dt>word</dt><dd>meaning</dd>
    <dt>word</dt><dd>meaning</dd>
</dl>

Visual rendering I need:

*word* meaning
*word* meaning
*word* meaning
like image 266
takeshin Avatar asked Jul 19 '10 19:07

takeshin


1 Answers

Try this.

dt  {
    clear:left;
    float:left;
    font-size:12px;
    line-height:26px;
    width:70px;
}

dd {
    clear:right;
    font-size:12px;
    line-height:18px;
    padding:4px 0 4px 40px;
}
like image 194
gearsdigital Avatar answered Oct 16 '22 08:10

gearsdigital