Getting rid of bullet points from <ul>

HtmlHtml Lists

Html Problem Overview


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?

Html Solutions


Solution 1 - Html

Assuming that didn't work, you might want to combine the id-based selector with the li in order to apply the css to the li elements:

#otis li {
    list-style-type: none;
}

Reference:

Solution 2 - Html

I had the same extreme irritating problem myself since the script did not take any notice of my styelsheet. So I wrote:

<ul style="list-style-type: none;">

That did not work. So, in addition, I wrote:

<li style="list-style-type: none;">

Voila! it worked!

Solution 3 - Html

The following code

#menu li{
  list-style-type: none;
}

<ul id="menu">
    <li>Root node 1</li>
    <li>Root node 2</li>
</ul>

will produce this output:

output is

Solution 4 - Html

To remove bullet points from unordered lists

    , you can use:

    list-style: none;
    

    You can also use:

    list-style-type: none;
    

    Either works but the first is a shorter way to get the same result.

Solution 5 - Html

Try this instead, tested on Chrome/Safari

ul {
 list-style: none;
}

Solution 6 - Html

To remove bullet from UL you can simply use list-style: none; or list-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.

Solution 7 - Html

Put

<style type="text/css">
 ul#otis {
     list-style-type: none;
   }
</style>

immediately before the list to test it out. Or

<ul style="list-style-type: none;">

Solution 8 - Html

This worked perfectly HTML

<ul id="top-list">
        <li><a href="#">Home</a></li>
        <li><a href="#">Process</a></li>
        <li><a href="#">Work</a></li>
        <li><a href="#">Team</a></li>
        <li><a href="#">Contact</a></li>
      </ul>

CSS

#top-list{
  list-style-type: none;
  list-style: none;}

Solution 9 - Html

There must be something else.

Because:

   ul#otis {
     list-style-type: none;
   }

should just work.

Perhaps there is some CSS rule which overwrites it.

Use your DOM inspector to find out.

Solution 10 - Html

I had the same problem, and the way I ended up fixing it was like this:

ul, li{
    list-style:none;
    list-style-type:none;
}

Maybe it's a little extreme, but when I did that, it worked for me.


Hope this helped

Solution 11 - Html

for inline style sheet try this code

<ul style="list-style-type: none;">
    <li>Try This</li>
    </ul>

Solution 12 - Html

In a chrome, you can use

ul {
 list-style: none;
}

Solution 13 - Html

your code:

ul#otis {
    list-style-type: none;
}

my suggestion:

#otis {
    list-style-type: none;

}

in css you need only use the #id not element#id. more helpful hints are provided here: w3schools

Solution 14 - Html

I had an identical problem.

The solution was that the bullet was added via a background image, NOT via list-style-type. A quick 'background: none' and Bob's your uncle!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSam KhanView Question on Stackoverflow
Solution 1 - HtmlDavid ThomasView Answer on Stackoverflow
Solution 2 - HtmlJohn OlavView Answer on Stackoverflow
Solution 3 - HtmlKishanView Answer on Stackoverflow
Solution 4 - HtmlPhilpotView Answer on Stackoverflow
Solution 5 - HtmlPaul KaplanView Answer on Stackoverflow
Solution 6 - HtmlRokan NashpView Answer on Stackoverflow
Solution 7 - HtmlStuffView Answer on Stackoverflow
Solution 8 - HtmlpokumarsView Answer on Stackoverflow
Solution 9 - HtmlPeeHaaView Answer on Stackoverflow
Solution 10 - HtmlBraden BestView Answer on Stackoverflow
Solution 11 - HtmlLukeView Answer on Stackoverflow
Solution 12 - HtmlFranklin CorreiaView Answer on Stackoverflow
Solution 13 - HtmlEvanView Answer on Stackoverflow
Solution 14 - HtmlRuskinView Answer on Stackoverflow