CSS list-style-type not working

前端 未结 6 941
误落风尘
误落风尘 2021-02-05 06:11

I have set the list-style-type in CSS, but for some reason it\'s not showing it.

相关标签:
6条回答
  • 2021-02-05 06:40

    Because of your padding reset, the numbers are actually off to the left of the page. Try adding:

    list-style-position: inside;
    
    0 讨论(0)
  • 2021-02-05 06:40

    If nothing of this work, make sure you don't have elements explicitly marked as display block inside the LI. It just happened to me with a H4 A set as block inside the LI. I was about to resign

    0 讨论(0)
  • 2021-02-05 06:51

    Decimal is default for an "ol". No need to declare it. Also the numbers are there just falling off the side of the page i.e. invisible. Adjust your padding and get rid of the redundant declaration. See here

    0 讨论(0)
  • 2021-02-05 07:01

    just remove "display : block;" from your li element

    0 讨论(0)
  • 2021-02-05 07:02
    display:list-item;
    list-style-position:outside;
    

    It may give problem if list display: attribute is set to some thing else than display:list-item;

    0 讨论(0)
  • 2021-02-05 07:03

    In my case it wasn't working with <ul>.

    I suspected it was possibly because of a CSS reset file I was using.

    I set the ul { display:list-item; } as suggested above, and it just worked fine.

    Check if you are using any reset files. They could be tricky at times.

    0 讨论(0)
提交回复
热议问题