Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting rid of bullet points from <ul>

People also ask

How do you hide ul marker?

You can hide them using ::marker pseudo-element.

How do I remove ul indentations?

The padding-left:0 is used to remove indentation (space) from left. The list-style: none property is used to remove list-style property from the list of items.

How do I get rid of bullet points in HTML?

To remove the HTML list bullets, set the "list-style-type" to "none".


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:

  • list-style-type at the Mozilla Developer Center.

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!


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


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.