What if you have a bulleted list where you want the bullet color to be different than your text color? There's no property in the list-style that allows for this, unless you want to use images for your bullets, so instead we'll just add a span within our list items, and style the list and the list spans with different colors.
The Code
In this example, I'm adding 4 list items, the first 2 without the span, and the last 2 with so we can see the difference:
My list items with a span will look like so:
ul {
margin: 50px;
list-style: inside;
color: red;
}
ul span {
color: black;
}
Presto.
No comments:
Post a Comment