I am using a contentEditable div to add my contents. i set the font size, color, face and bullets from my UI using javascript(script#). I apply my own bullet style using css. Here is one of my css
.marker-check-mark:before{
content: "\2718";
margin: 0.5em;
color : Black;
}
this prints a "check mark" as the "ul" type.
Now i want to give its font size as 16. but i dont want this to affect the font size of the contents of this list.
Is there a way to do this.
One solution is to add font tag or span tag with syle attributes inside every li. But i want to avoid this solution.
please give me a better solution.....
I think you're more-or-less answered your own question on this one!
Here's your answer:
The
:beforepseudo-element essentially acts as a stand-alone element in your DOM which means that you can style it entirely separately from the element itself. So, addingfont-sizeto.marker-check-mark:beforewill not effect the font-size of.marker-check-mark.Have a read here for more information on how it all works: http://coding.smashingmagazine.com/2011/07/13/learning-to-use-the-before-and-after-pseudo-elements-in-css/