I have the following list:
<ul id="otis">
<li>Benz</li>
<li>Other Benz</li>
<li>Other Other Benz</li>
</ul>
I want to get rid the bullets so i tried:
ul#otis {
list-style-type: none;
}
That didn't work though. What is the proper way to remove the bullets from the displayed list?
To remove bullet from
UL
you can simply uselist-style: none;
orlist-style-type: none;
If still not works then i guess there is an issue of priority CSS. May be globally UL already defined. So best way add a class/ID to that particular UL and add your CSS there. Hope it will works.Assuming that didn't work, you might want to combine the
id
-based selector with theli
in order to apply the css to theli
elements:Reference:
list-style-type
at the Mozilla Developer Center.To remove bullet points from unordered lists , you can use:
You can also use:
Either works but the first is a shorter way to get the same result.
Put
immediately before the list to test it out. Or
This worked perfectly HTML
CSS
I had the same problem, and the way I ended up fixing it was like this:
Maybe it's a little extreme, but when I did that, it worked for me.
Hope this helped