The first .block1911 “block” span doesn’t contain another “block” span that breaks the line.
The second does. That block display on the “superscript” span should be changed to inline-block, that would still allow it to take the properties of a block but would not break the line as it resides on a line.
That very nearly works in that it has done three of the four. It has not done the first one.
I can see from looking at the element that the span is not being read and the original block only is taken. It doesn’t even superscript the t which seems odd to me
Would you be kind enough to have a quick look at this please?
But then you use a <p> not a <span>. That’s not semantic, the paragraph is a block element and should not be a sibling to inline elements. The <p> also has default margins to give vertical space between paragraphs.
I suggest you change the p to span!
The css can be the same though I think the font-size and the bottom position you apply could be increased a little to look more like superscript.
Rather than a <span> maybe use a <sup> for this, you shouldn’t need a class for it.
Note, I generally override the default browser styling of sup to use relative positioning, like yo have set up. The reason being that otherwise it can create inconsistencies in the line heights of a paragraph. Those that contain superscript may have a wider gap than others, relative positioning of the superscript negates this problem.
But taking semantic considerations, I think you should use the <sup> tag as it has the correct meaning here. Then you could skip the use o the “superscript” class and use the “sup” selector instead, letting the html sup tag get that styling, just as @SamA74 suggested:
You use a . to indicate a class name, as you use a # to indicate an id name. Elements just go by their name, whether it’s h1, p, span, sup or whatever.
One thing I neglected to mention about overriding the default sup styling.
You may need to reset the vertical-align property to bottom to fix the line height problem, then use position: relative and bottom: to offset it without altering flow.
If you want to keep the vertical alignment set to super, that’s fine if you are happy with that. But then you probably don’t even need to style it at all, as that’s its default alignment.
Only set it manually if you find it gives you leading (line height) problems.