How To Style Only A Part Of Text In Css
I need to add superscript in dropdownlist options. I tried many ways but nothing worked out. So help me to how to style a only a part of option text to make it appear like superscr
Solution 1:
There is no way to do this in HTML/CSS/Javascript
However for all those trying to do it out of a <select>
tag, wrap the content you intend to superscript in a <span>
element and then apply CSS to it.
Example
HTML
<p>x<spanclass="superscript">2</span> = 9</p>
CSS
span.superscript { vertical-align: super; font-size:50%; }
Post a Comment for "How To Style Only A Part Of Text In Css"