I have created an unordered list. I feel the bullets in the unordered list are bothersome, so I want to remove them.
Is it possible to have a list without bullets?<
I tried and observed:
header ul {
margin: 0;
padding: 0;
}
Small refinement to the previous answers: To make longer lines more readable if they spill over to additional screen lines:
ul, li {list-style-type: none;}
li {padding-left: 2em; text-indent: -2em;}
ul{list-style-type:none;}
Just set the style of unordered list is none.
If you are developing an existing theme, it's possible that the theme has a custom list style.
So if you cant't change the list style using list-style: none;
in ul or li tags, first check with !important
, because maybe some other line of style is overwriting your style. If !important
fixed it, you should find a more specific selector and clear out the !important
.
li {
list-style: none !important;
}
If it's not the case, then check the li:before
. If it contains the content, then do:
li:before {
display: none;
}
In case you want to keep things simple without resorting to CSS, I just put a
in my code lines. I.e., <table></table>
.
Yeah, it leaves a few spaces, but that's not a bad thing.
To completely remove the ul
default style:
list-style-type: none;
margin: 0;
margin-block-start: 0;
margin-block-end: 0;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 0;