Jump to content

how to make ® as a superscript and smaller

Recommended Posts

Hello!

I would like to make the ® as a superscript and smaller on our website. The ® is in headings and in texts and links.

Can anyone assist and also in simple terms? (I am a Squarespace beginner!).

Thanks!
Sara

Link to comment
  • Replies 3
  • Views 649
  • Created
  • Last Reply

Top Posters In This Topic

On 8/16/2024 at 4:21 PM, sarajn said:

yes!

www.unfoldmethod.com

Try this code to Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  var term = '®';
$('div.html-block *').html(function () { 
    return $(this).html().replace(new RegExp(term + "(?=[^>]*<)","ig"), "<span class='superscripts'>$&</span>");
});
});
</script>
<style>
span.superscripts {
    font-size: 16px;
    position: relative;
    top: -20px;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.