Complete list of reasons why a css file might not be working

后端 未结 19 2318
醉酒成梦
醉酒成梦 2020-12-09 02:20

This problem is making me feel like an absolute noob.

Here is the head of my .html file:




        
19条回答
  •  再見小時候
    2020-12-09 02:37

    I was facing the same problem, but the reason was the styling in the css is wrapped in an ID that is not exist

    #navi ul{
        color: red;
    }
    

    the #navi selector is nowhere in the HTML because i forgot to add it before writing the CSS. in my case I worked with Less file so I nested it like this

    #navi{
        ul{
           color:red;
       }
    }
    

    I hope this help to re-check when things doesn't work

提交回复
热议问题