I've a reset stylesheet that tells lists to remove their default bullet; { list-style: none; }

If I want to restore that default bullet, how may I do so? I've had no luck trying to force different list-style: 's.

5 answers

6
points

Hello,

Do you want to override your reset rather than altering it? if you have had no luck trying to force different list styles then it could be an issue of specificity. It depends how you are doing it. Do you have a sample url or minimum test case to describe what you want to achieve?

Your reset of list-style: none is actually the shorthand to set the bullet and its position. As Chris mentioned, you would be better off setting list-style-type to none in your reset and on the specific ul you want to target as disc or similar.

If you do this, your bullet may not appear however if in your reset you have also zero'd your margins and paddings on the list and list item, so it could be that when you tried to restore the bullet it just wasnt visible. Try setting your margin on the list item to have 2em on the left to check to see if it is there.

Kind regards, Natalie

Answered over 7 years ago by Natalie Downe
3
points
 ol, ul, li {list-style:disc}

This ought to work?

Answered over 7 years ago by Shaun Robinson
0
points

Hi,

in your reset style sheet, change { list-style:none } to { list-style-type:none } then on your UL/OL ID/Class use the following { list-style-type: "desired style"; } remember to apply your padding and margins.

Answered over 7 years ago by Chris Hamilton
0
points

Hi,

in your reset style sheet, change { list-style:none } to { list-style-type:none } then on your UL/OL ID/Class use the following { list-style-type: "desired style"; } remember to apply your padding and margins.

Answered over 7 years ago by Chris Hamilton
0
points

Thanks very much for your responses. Shaun Robinson's initial answer of using list-style: disc; worked a treat.

Special thanks to you Natalie for the effort you've put into your answer!

Answered over 7 years ago by Russell Bishop