try
.aftersup {
font-size: 1em;
margin: left;
vertical-align: .7em;
}
or plain "after"
.after {
font-size: 1em;
margin: left;
vertical-align: .7em;
}
".a.external:after" could be simplified
or
.after {
font-size: 50%;
margin: left;
vertical-align: .7em;
}
using "font size 50%" - 50% of what size? this might not work well if not used within some tag defining text size previous to superscript...
if you use "font-size: 1em;" then the font size is set for sure, without reference to a tag that defines link text size, unless link text is set at 100% and superscript is 50% of that 100%.
Using "font-size: 1em;" actually sets font size baseline.
Set "vertical-align" size smaller, if you want superscript font to be smaller than link text
Set "vertical-align" size same as font size, if you want superscript font to be same size as link text
To align with link text, you need to set "margin" same as link text (left, center, right, justified).
.text {
font-size: 1em;
margin: left;
}
.aftersup {
font-size: 1em;
margin: left;
vertical-align: .7em;
}
It should be something like below example links with superscript
<p class="text"><a href="url">https://stackoverflow.com/questions/501671/superscript-in-css-only</a><aftersup>+</aftersup></p>
or
<p class="text"><a href="url">https://stackoverflow.com/questions/501671/superscript-in-css-only</a><aftersup>You got this</aftersup></p>
or
<a href="url">https://stackoverflow.com/questions/501671/superscript-in-css-only</a><aftersup>+</aftersup>
or
<a href="url">https://stackoverflow.com/questions/501671/superscript-in-css-only<aftersup>You got this</aftersup>
As in...
or
Superscript in CSS only?You got this