Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Tt

Template page
Revision as of 22:25, 27 April 2018 by Chao (talk | contribs) (remove tooltip on mobile screens)

This is a template to help write tooltips. They can be hovered over or tapped to display the tooltip.

Usage & Examples

{{tt|Normal text|Tooltip text (required)
  |line=false                 (optional, "true" by default - see the "No underline" example below)
  |text-align=left            (optional, "center" by default - see the "Left-aligned text" example below)
}}

You can nest this template for two tooltips: one appears above and one below. See the "nested tooltip" example below.

{{tt|{{tt|Description|This tooltip appears below}}|This tooltip appears above}}
Default
{{tt|Normal text|Tooltip text}
Tooltip text

Options

No underline
{{tt|Normal text without underline|Tooltip text|line=false}}
Tooltip text

·

Left-aligned text
{{tt|left-aligned text|Tooltip text|text-align=left}}
Tooltip text

·

Nested tooltipBottom text
{{tt|{{tt|Nested tooltip|Bottom text}}|Top text}}
Top text

Tooltip Styles

Preview what certain items will look like inside a tooltip.

Horizontal Rule
{{tt|Tooltip text with horizontal rule|Tooltip<hr>Text}}

Tooltip Text

·

Links
{{tt|left-aligned text|[[Main Page|existing link]].}}
Tooltip new link and existing link.

·

Highlights
{tt|Highlights|{{h|test}}}}
test
(ref Template:H)

·

Images
{{tt|Images|[[File:BlazBlue Central Fiction Logo.png]]}
BlazBlue Central Fiction Logo.png

Warnings

This template is best used completely inline (i.e. without newlines, or with the newline commented out like so: <!-- commented out stuff goes in here -->). This is because a newline after the normal text will be rendered as an underlined space (e.g."

Text Tooltip

" instead of "

TextTooltip

").

Wrong
{{tt|Wrong
|Tooltip}}
Tooltip

·

Right
{{tt|Right<!--
-->|Tooltip}}
Tooltip