is it possible to change the color of the bullet?

Report
Question
751 views

The color of the bullet is always the color of the first text of the list. So, if you want to change the color of the bullet, you must change the color of the text.

Please explain why do you think this question should be reported?

Report Cancel
<html>
   <head>
        <title>Changing Bullet Colors</title>
          
        <style>
            h3{
                color:green;
            }
              
            ul{
                list-style: none;
            }
              
            ul li::before {
                  
                /*\25E6 is the CSS Code/unicode for a circle */
                content: "\25E6";  
                color: green; 
                display: inline-block; 
                width: 1em;
                margin-left: -0.9em;
                font-weight: bold;
                font-size:1.1rem;
            }
        </style>
  </head>
    
  <body>
    
    <h3>Best Movies</h3>
      
    <!-- Create an Unordered List -->
    <ul>
        <li>Star Wars</li>
        <li>Back to the future</li>
        <li>Ghostbusters</li>
        <li>The princess bride</li>
        <li>Shaun of the dead</li>
    </ul>
      
  </body>
    
</html>

Thread Reply

Leave an comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>