Reputation: 10191
When dealing with special characters is there a way to shrink only the special character and shift the position up slightly?
In particular I am trying to use the registration character (little R with circle) but it seems to render at the same size of the font which is not how it should be displayed. It should be shifted up towards the top of the text and the size should be at least half the size.
Is there some sort of escape character that can be inserted right before it so it renders correctly? Or is there a way to use CSS to select only the special character from the text?
The only option I can think of is enclosing each one in a tag or something similar but I would think that there is a better way of doing this.
Upvotes: 0
Views: 152
Reputation: 1438
You could use the sup tag.
<sup>®</sup>
Which is equivalent to:
sup {
vertical-align: super;
font-size: smaller;
}
Upvotes: 2
Reputation: 7668
Two options for you. I don't mean to steal from @aaronmallen, I just want you to have a comparison.
CSS (change ELEMENT to whatever - span most likely):
ELEMENT:after {
content: '\00AE';
display: inline; /* if you use on a block element like div */
zoom: .75;
position: relative;
top: -8px; /* because default font size is 16px */
}
HTML would be the <sup>®</sup>
that was posted already.
Upvotes: 4