Template:Tooltip: Difference between revisions

From FamilySearch Wiki
m (Added margin-left)
m (Reverted edits by Ahancey (talk) to last revision by Batsondl)
Tag: Rollback
Line 1: Line 1:
{{#if: {{{Hover words|}}}|
{{#if: {{{Hover words|}}}|
<div class="tooltip"><u style="border-bottom: 1px dotted black; text-decoration: none;">{{{Hover words}}}</u>
<div class="tooltip"><u style="border-bottom: 1px dotted black; text-decoration: none;">{{{Hover words}}}</u>
<span class="tooltiptext" style=" width:{{{Width}}}; margin-left:{{#expr:-{{{Width}}}/2}}px;">{{{Words in popup}}}</span>
<span class="tooltiptext" style=" width:{{{Width}}};">{{{Words in popup}}}</span>
</div>
</div>
}}
}}

Revision as of 19:02, 19 June 2020


This template will create a popup box tooltip when the user hovers over 'Hover words', which will be underlined. The following is an example of what the call to this template should look like:

 {{Tooltip
  |Width=200px   /* adjust to desired box width */
  |Hover words=Hover over these words
  |Words in popup=Words here will show up in a box when a user hovers over the 'Hover words'.
 }}