1

I want to add a site-wide image on external links that show that the link is external.

Like in this answer: https://ux.stackexchange.com/a/2502/41541

I can do this by editing the CSS somehow, but what would be the best strategy for getting an image on my SharePoint and editing the CSS to do this?

When I inspected an internal link on the page and an external link, I found they have no class set, so I'm not sure how I'd find external links with CSS.

0

We solved this by using an HTTP module scanning the DOM for anchor tags and using a regular expression to check if they are external or not (I think our comparison was something like, if the link contains HTTP then we assumed external). The http module would then apply a class to the anchor tag.

Not sure if there is a way to do this with plain CSS. Perhaps in the later versions of CSS, but you might run into browser compatibility issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.