I have a list,
<ul class="listStyle">
<li>
<strong>View :</strong> blah blah.
</li>
<li>
<strong>Edit :</strong> blah blah blah.
</li>
</ul>
I am using square bullet for list.
.listStyle{
list-style-type: square;
}
Bullets appears in black color. Is it possible change the color of the bullet? If yes, how can i change it?
Please help, Thanks
Click a bullet or number in a list. All the bullets or numbers in the list are selected. On the Home tab, in the Font group, make the changes that you want. For example, click the arrow next to Font Color, and then click the color that you want.
There are two ways to change the color of the bullet:Using an extra markup tag. Using Css style ::before selector.
You will have to click on the Design tab located on the left side of the screen when you are editing your campaign. Once you click on that tab you will want to scroll a little bit down until you see a section that says "Fonts". Then, you will click on the "A" that has a color bar underneath it and select a new color.
Example JS Fiddle
Bullets take the color
property of the list:
.listStyle {
color: red;
}
Note if you want your list text to be a different colour, you have to wrap it in say, a p
, for example:
.listStyle p {
color: black;
}
Example HTML:
<ul class="listStyle">
<li>
<p><strong>View :</strong> blah blah.</p>
</li>
<li>
<p><strong>View :</strong> blah blah.</p>
</li>
</ul>
I would recommend you to use background-image instead of default list.
.listStyle {
list-style: none;
background: url(image_path.jpg) no-repeat left center;
padding-left: 30px;
width: 20px;
height: 20px;
}
Or, if you don't want to use background-image as bullet, there is an option to do it with pseudo element:
.liststyle{
list-style: none;
margin: 0;
padding: 0;
}
.liststyle:before {
content: "• ";
color: red; /* or whatever color you prefer */
font-size: 20px;/* or whatever the bullet size you prefer */
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With