Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have Plus sign (+) in <li> list-style?

I wonder if we can use the Plus sign in the list style. Instead of Disc, Circle... in <li> List-style, can we have a plus sign?

li {list-style: disc...}
like image 671
abcid d Avatar asked Sep 22 '13 04:09

abcid d


2 Answers

There is no list-style for a plus sign like there is for the disc, circle, etc., but you can achieve similar results using the :before selector together with the content property.

Here is the CSS code to get it to work:

ul {
    list-style: none;
}

li:before {
    content: "+";
    margin-right: 4px;
}
like image 170
dhouty Avatar answered Oct 14 '22 18:10

dhouty


you can use a image instead of it.

li{list-style-image:url('...');}
like image 20
Joyce Lee Avatar answered Oct 14 '22 17:10

Joyce Lee