Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

content attribute text color - css

I would like to add color to a text in the content attribute. I did like this, didn't work

 .atleastTwoChars:after
 {
    content: "2*";
    float: left;
    width: 16px;
    height: 14px;
    border: 0;
    margin: 2px 3px 0px 3px;
    color:#FFBC0000;
}
like image 627
dotnetrocks Avatar asked Sep 26 '26 15:09

dotnetrocks


1 Answers

There are 8 digits in your color:

color:#FFBC0000;

Were your extra two zeroes added by accident?

color:#FFBC00;

Or does the FF represent 100% alpha (completely opaque)? If so, leave it out; CSS hex colors don't support specifying the alpha channel, only the rgba() notation does:

color:#BC0000;
like image 57
BoltClock Avatar answered Sep 28 '26 07:09

BoltClock