Like superscript in link

.project-link {
font-family:Arial; 
display:inline-block;
color:#FFF;
font-size:5vw;
white-space:nowrap;
text-decoration:underline;
margin-right: 3%;
line-height:120%;
}
body {
  background-color: black;
}
<a class="project-link" id="one" href="#modal1">Maru Speaker Design <sup> (1) </sup> </a>
<
Run codeHide result

I am trying to get (1) to be superscript.

EDIT https://jsfiddle.net/v1jn1nus/

Added pic with Arial font.

I just do not understand. He also works on the violin ...

enter image description here

enter image description here

+4
source share
1 answer

This vertical-align:super;is why check to see if your style matches the reset vertical-align for this element.

Check this:

.project-link {
font-family:Arial; 
display:inline-block;
color:#FFF;
font-size:5vw;
white-space:nowrap;
text-decoration:underline;
margin-right: 3%;
line-height:120%;
}

.project-link > span { vertical-align:super; }

body {
  background-color: black;
}
<a class="project-link" id="one" href="#modal1">Maru Speaker Design <span> (1) </span> </a>
<
Run codeHide result
+5
source

Source: https://habr.com/ru/post/1598976/


All Articles