Reputation: 9332
I need to inject some text before and after the hey
characters.
I need a CSS only solution.
My html:
<span class="wsite-headline">
<font size="5">hey</font>
<br>
<strong>dude</strong>
</span>
I already try this css:
.wsite-headline font:before { content "before"; }
.wsite-headline font:after { content "after"; }
But it doesn't work.
Any idea ?
Upvotes: 1
Views: 56
Reputation: 175766
Double ::
for the selector and your missing a single :
after content
.wsite-headline font::before { content: "before"; }
(<font>
is depreciated in HTML5, consider a <span>
and CSS to define the size)
Upvotes: 7