Eric Wilson
Eric Wilson

Reputation: 59385

Can the spacing of a defintion list be adjusted in html/css?

I'd like a defintion list that looks like:

 term 1
   definition 1
 term 2
   definition 2

rather than

 term 1
      definition 1
 term 2
      definition 2

What's the easiest way to to this?

Upvotes: 0

Views: 77

Answers (3)

chadl
chadl

Reputation: 195

Or:

dd {
   margin-left: 2em;
}

Which will indent 2 characters in.

Upvotes: 1

Barry Gallagher
Barry Gallagher

Reputation: 6246

You need to set the margin-left attribute for the dd tag:

dd {
    margin-left: 20px;
}

Upvotes: 0

Paolo Bergantino
Paolo Bergantino

Reputation: 488534

Add a margin-left declaration to the <dd> element:

dd { margin-left: 15px; }

You'll have to adjust the amount to whatever suits your needs, obviously.

Upvotes: 1

Related Questions