Mobile app version of vmapp.org
Login or Join
Annie201

: How can I superscript a single character throughout my site? Finishing up development work for a client and they have a late request to superscript every occurrence of the &reg character

@Annie201

Posted in: #WebDevelopment

Finishing up development work for a client and they have a late request to superscript every occurrence of the &reg character throughout the site. I merely get by with CSS, but not even sure CSS provides the best solution here. how can I make a global change to every occurrence of a single character in the site copy without going back and adding tags everywhere?

if the best solution does involve inserting a span or other tag I'm thinking it could be accomplished with a database query (all the copy is wired up to a CMS).

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie201

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kevin317

If the content is in a database you should be able to replace all ® in their content with one query (assuming it is all in one table). It would look like this (assuming MySQL):

UPDATE tablename SET fieldname = REPLACE(fieldname, '&reg;', '<sup>&reg;</sup>')


edit

I just used the <sup> tag instead of CSS. You can obviously choose which method you prefer.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme