about - tech blog -
wildlink.com

Wildlink's Technology Blog
An occasionally updated list of informative articles.
Pulled from our internal wiki.
CSS - Add an external link signifier
2022-07-29

Simple one today.

You can have CSS automatically add an external link signifier to any external URL

    <a href="https://external_url">External URL</a>

with the following CSS

a[href^="http://"], a[href^="https://"]  {
    background: url("<PATH TO IMAGE>") center right no-repeat;
    padding-right: 1em;
}
Back to the Tech Blog
Blog engine: 1.4.0