JSFiddle - React, Tailwind, and code Playground
HTML
<div class='parent'>
<p>I need the text to look normal <sup class="reference">[1]</sup> every where</p>
</div>
CSS
sup {
position: fixed;
}
.parent {
width: 600px;
height: 200px;
background-color: yellow;
}
.test {
position: absolute;
top: 0;
left: 0;
z-index: 1010;
display: none;
max-width: 400px;
padding: 1px;
text-align: left;
background-color: #ffffff;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
white-space: normal;
opacity: 1;
display: block;
top: 90px;
}
JavaScript
$('.reference').html($('.reference').html() + "<div class='test'>" +
"<h3>Title</h3>" +
"This is my random text, that I need to be almost, about this length, maybe a little more... well yea this is enough.<em>Thanks.</em> 6. <a href=\"http://www.google.com\" target=\"_blank\">[pdf]</a>" +
" </div>")