To make it as if the sup
elements were never there, you need to take them out of the flow of the document. I've done this by using position: absolute
. (Here comes the magic part.) To then keep those elements positioned near the content, you make sure that their containing element (the p
) also has a positioning context - position: relative
in this case.
Here's the CSS:
p {
position: relative;
}
sup {
position: absolute;
top: -1em;
color: green;
font-weight:bold;
font-size: 73%;
}
Note that I removed some stuff for simplicity, and just styled the sup
elements directly, rather than using their class.