61

I've got a stylesheet that will not, for whatever reason, apply list-style-type to a UL element. I'm using YUI's Grid CSS with their reset-fonts-grid.css file, which I know strips that out as part of the CSS reset.

After calling YUI, I call the stylesheet for the website and in there have a block for UL:

ul {list-style-type: disc;}

I've also tried setting it via list-style but get the same result. I know that the above CSS block is getting read as if I add things like padding or margins those do get applied. The style-type isn't showing up in either Firefox or IE.

The only other CSS I've applied to UL's are in a #nav div but that CSS doesn't touch the list-style-type, it uses the reset that YUI provided, and YUI and the site style sheet are the only two CSS sheets that are called.

I've also got FCKEditor on the admin side of the site and that editor does show the bullet styles so I know it has to be something with the CSS that isn't being filtered by FCKEditor.

dragonmantank
  • 15,243
  • 20
  • 84
  • 92

16 Answers16

183

You need to include the following in your css:

li { display: list-item; }

This triggers Firefox to show the disc.

indubitablee
  • 8,136
  • 2
  • 25
  • 49
  • 3
    This worked for me. if I use `li { display:block;}` I get no disc. – Cheeso Jun 12 '12 at 00:50
  • 1
    Holy cripes, this really is a display property? Can't believe **this** was what broke my CSS, hahaha. – AlbertEngelB Apr 24 '14 at 21:30
  • 1
    You deserve a ton of upvotes. Thanks for saving me an hour of head-scratching. – Ryan Griggs Feb 19 '17 at 05:06
  • 1
    Woah. Didn't even think the issue would be display property. You are a lifesaver. – Hilario Goes Mar 17 '18 at 12:14
  • not sure when changes happened that required the element to be display:list-item (default for
  • ) to show the bullet... it does go back to at least 2014, but i didn't do any deep research... but it has NOT always been that way...
  • – aequalsb Mar 18 '23 at 18:37