I am trying to override a CSS setting for lists in one of my pages. In my master CSS file, I have set the following rule:
ul, li { list-style-type: none; }
I have one page, where I DO want to set the style of the list - I would also like to increase the spacing between those list items on that single page.
The page looks like this:
Hello
line 1
line 2
line 3
line 4
So far I have tried the following:
- Adding the style to the containing UL tag
- Adding the style BOTH to the containing UL tag and each LI tag
None has worked so far. Since I have over 1K pages referencing the main.css file, I do not want to change it. But how can I override the settings for the specific list items in my page?
Why am I not able to override the settings in my main.css if even I apply the style at the element itself?
以上就是How to override CSS style (list-style-type) set in main CSS file的详细内容,更多请关注web前端其它相关文章!