tags:

views:

222

answers:

4

I am using dl,dt and dd tags in one of my project . Now I want give a bullet before dd . How can I make my dd's to a bulleted list using css ?

Any Ideas ???

A: 

Use a background-image.

Or try:

dd
{
    display: list-item;
    list-style-type: disc;
}

No idea if it will work though.

anddoutoi
A: 

tested it in firefox and just adding the style display:list-item should do the trick

Ramuns Usovs
+1  A: 

You can either use the style attribute in the "dd" tag, or move that to a "style" section as a class or id. Since the dl is a list type you do not need the "display: list-item;" I think, might also be wrong. Anyways This might be used. Instead of the disc, you might use other types (look at http://www.w3schools.com/css/pr%5Flist-style-type.asp)...

<html>
  <body>
    <dl>
      <dt>Term</dt>
      <dd style="display: list-item;">Term description</dd>
    </dl>
  </body>
</html>

Hope this helps.

Riza Dindir
inline styles are bad practice ... use the stylesheet ... that's what it's for!
Jonny Haynes
+3  A: 

Easiest way is to change the properties on your <dd>

dd {
    display: list-item;
    list-style-type: disc;
    }

Works in every browser.

See this article: http://www.quirksmode.org/css/display.html

Jonny Haynes
May also need to play with the margin/padding.
DisgruntledGoat