This Forum has been archived

Forums: Admin Central Index Technical Help A way to identify span ids
Central's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 2627 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

I'm looking for a way to replicate what happens with references with span ids also known as anchors. For example:

This is a statement[1].

  1. This is a reference

To click on the [1] highlights the relevant reference below. Is there any way to replicate this with span ids?

For those unfamiliar with span ids if you click here, you will be directed to the sentence "Ut ac elementum lacus." below. They're used to link to part of the page that isn't directly under a title.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eu ipsum eget arcu iaculis dignissim et ut nulla. Sed condimentum congue erat at mollis. Aliquam cursus, nulla id porta fermentum, velit massa laoreet turpis, et rhoncus nisi risus sit amet risus. Aliquam in nisl in tortor porta lacinia. Curabitur vestibulum mattis tristique. Quisque in lectus sollicitudin magna tincidunt lacinia. Nunc odio mauris, congue bibendum fermentum vitae, accumsan convallis metus. Ut vitae augue in risus porta suscipit. Ut ac elementum lacus. Proin faucibus mauris pellentesque metus blandit fermentum. Aliquam sapien quam, volutpat sagittis sollicitudin ac, sodales vitae erat. Sed id massa quis justo placerat vulputate vitae non leo. Morbi luctus, elit et scelerisque fringilla, nibh augue rutrum nisl, ac ullamcorper quam lorem vitae lorem. Ut semper neque vitae eros euismod tincidunt. Nulla posuere euismod justo in mattis.

Any ideas? User:Cåm/Signature

wikipedia:en:template:Ref_label & wikipedia:en:template:Note_label & wikipedia:en:template:Ref & wikipedia:en:template:Note-- 08:33, November 9, 2012 (UTC)
Um you can block the ID Captain<Pikachu HogwartsCrest 08:42, November 9, 2012 (UTC)
@ - They just look like standard citation templates to me. I tried adding the reference class to the span, but I don't think that's how it works.
@Captain Pikachu - How? User:Cåm/Signature
jQuery Hair (talk) 13:52, November 9, 2012 (UTC)

Solution found using CSS: create a class such as .targethilite:target {background-color:#3a3a3a;} which can then be used (span class="targethilite" id="anchorname">TEXT</span>) to highlight the relevant text. Credits to Joeytje50 for this. User:Cåm/Signature

Community content is available under CC-BY-SA unless otherwise noted.