Template talk:ShipBoxTooltip
Problem with the template
Does this, {{Ship|Vexor|mode= tooltip}} stays inline? |
Does this,
Vexor
Vexor
Standard Cruisers Vexor Class
4 (0/4) 4 5
700 MW 300 tf
195 m/sec
480 m³
|
stays inline?
No, it does not.
Does this, {{:Vexor|mode= tooltip}} stays inline? |
Does this,
Vexor
Vexor
Standard Cruisers Vexor Class
4 (0/4) 4 5
700 MW 300 tf
195 m/sec
480 m³
|
stays inline?
No surprise here as the second example is exactly what {{Ship}} produces.
<div> Does this, {{Ship|Vexor|mode= tooltip}} stays inline? </div> |
Vexor
Standard Cruisers Vexor Class
4 (0/4) 4 5
700 MW 300 tf
195 m/sec
480 m³
|
Now this works, as does putting it inside a <span>,
Vexor
Standard Cruisers Vexor Class
4 (0/4) 4 5
700 MW 300 tf
195 m/sec
480 m³
|
- or a table.
Vexor
Standard Cruisers Vexor Class
4 (0/4) 4 5
700 MW 300 tf
195 m/sec
480 m³
|
Vexor
Standard Cruisers Vexor Class
4 (0/4) 4 5
700 MW 300 tf
195 m/sec
480 m³
|
Using <p> however produces this
Does this, Vexor
Vexor
Standard Cruisers Vexor Class
4 (0/4) 4 5
700 MW 300 tf
195 m/sec
480 m³
|
stays inline?
Somehow the interaction between {{Ship}}, {{ShipBoxTooltip}} and the wiki parser creates this problem. I have been looking into this, but I have not been able to find a fix --Evon R'al (talk) 12:23, 11 May 2022 (UTC)
Update
After some more investigation I found the cause of the problem. It is the presence of a block level element, like div or table, in the content part of the {{Tooltip}}
template.
Demo:
Does this, {{Tooltip|test|<div>Content</div>}} stays inline? |
Does this,
test stays inline?
No, it does not.
made a notice of the problem on Template talk:Tooltip. -- Evon R'al (talk) 14:05, 9 February 2023 (UTC)