I am trying to use the glyphicons from twitter bootstrap. I want to use the pseudo-element :after instead of before.
.glyphicon.glyphicon-search:before
The above works just fine.
.glyphicon.glyphicon-search:after
The above does not work.
What am I doing wrong?
2
Answers
Maybe it is syntax issue.
Try
.glyphicon.glyphicon-search::after
?It’s because the glyphicon classes are only intended for use with :before and not :after. If you check out the source code in the CSS you’ll see. An example would be:
the css for this looks as so:
if it was like this:
you would be able to do your thing. You’ll need to create a new class and add the content like this: