Hello,
Is there a way to automatically highlight content that has an anchor associated with it?
Use Case
Issue: The user has to skim through the clutter on the page to find the relevant information.
Possible Solution: Highlight the inforamtion that is attached to the anchor.
(NOTE: I know that the anchored information is the top most information displayed on a scrolling page, but this is not satisfactory because: a) It is hard to get the context of the information when it is abutted to the top of the screen like that. b) Sometimes the anchored information is on a page that deosn't have enough content to allow for the anchored information to be placed at the top of the scrolling screen and thus it is left sitting out in the middle of a sea of content that the reader is not interested in.)
Can anyone out there help?
Thanks,
John
Hello John,
you can do this with the target pseudo class.
Use the css stylesheet macro and include this CSS on your confluence page:
h1:target { background: orange; }
Set a hyperlink to an h1 heading on that page and it will be highlighted with an orange background.
Just tried it: worked in my firefox, but not in my internet explorer.
Does that highlight all headings H1 or will it only become orange when there was a jump to it?
(I can not try it out as I'm not administrator and have no access to a "CSS stylesheet macro".)
Ammendment: I looked up the :target syntax and it seems that highlighting occurs only if there was jump to that heading:
https://www.w3schools.com/cssref/sel_target.asp
Thanks, Steffen. Great tip. I'll have my admin implement it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.