The answer to your main question is: ul is an element inside of which li elements are nested. You need separate rules for ul's and li's. You probably don't want the same borders and paddings applied to both. Say, you want much space around the list, but not in between the list items.
The default list-style-type value for an ordered list is decimal , whereas the default for an unordered list is disc .
List-style is simply the shorthand version for styling your list. List style type specifically refers to the indicator to the left such as the ever popular none, or disc, decimal, etc.
Adding the "list-style: none" CSS class to the unordered list (<ul>) or ordered list (<ol>) tag removes any bullet or number.
You need to include the following in your css:
li { display: list-item; }
This triggers Firefox to show the disc.
and you can also give a left-margin if the reset.css you are using make all margin null : that means :
li {
list-style: disc outside none;
display: list-item;
margin-left: 1em;
}
Assuming you apply this css after the reset, it should work !
Matthieu Ricaud
If I'm not mistaken, you should be applying this rule to the li, not the ul.
ul li {list-style-type: disc;}
I had this problem and it turned out I didn't have any padding on the ul, which was stopping the discs from being visible.
Margin messes with this too
This problem was caused by the li
display
attribute being set to block
in a parent class. Overriding with list-item
solved the problem.
Make sure the 'li' doesn't have overflow: hidden
applied.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With