Reputation: 51
I have a design like I mentioned in below screenshot where I want to display fa icon above end of text. Someone please help me to design like this.
Upvotes: 0
Views: 85
Reputation: 230
Try using the <sup></sup>
in HTML, this is an example replace X with whatever you want.
More information<sup>X</sup>
Upvotes: 1
Reputation: 36426
You can use the HTML sup tag on a Fontawesome icon in the same way as you would use it on an 'ordinary' character.
So for example to put the free Fontawesome info icon as a superscript you could do:
<div class="info">Total sales<sup><i class="fas fa-info"></i></sup></div>
From your image it looks as though you are using the Pro version of Fontawesome in which case substitute whatever the correct class is for the info icon with a circle round it instead of fa-info.
Upvotes: 0
Reputation: 19
this code will work , put your icon instead of 22
Upvotes: 0