Module talk:Sports table/Archive 2: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Sports table) (bot
m Archiving 1 discussion(s) from Module talk:Sports table) (bot
Line 1,259:
 
For now, I've worked around this issue by repeating the reference definition in each column. This seems pretty cumbersome, but perhaps it's the only solution for now. What alternative solutions are available? Are there plans to better document this template, make it easier to use (particularly for new users!), or address the referencing issues it regularly causes? -- [[User:Mikeblas|Mikeblas]] ([[User talk:Mikeblas|talk]]) 18:05, 28 August 2022 (UTC)
 
== float=center ==
 
Why not allow float=center? —[[User:Anomalocaris|Anomalocaris]] ([[User talk:Anomalocaris|talk]]) 20:29, 20 September 2022 (UTC)
:It's strange, isn't it? float=center is just not a thing, even though it seems like an obvious option. AFAICT, this module calls {{tl|stack begin}} to apply floating, and that template applies a CSS class. See [https://www.w3schools.com/css/css_float.asp the CSS spec] for details. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 21:04, 20 September 2022 (UTC)
{{outdent}}
[[User:Jonesey95|Jonesey95]]: I asked the question because I edited [[Draft:2022–23 National Basketball League (England) season]], where someone had two of these tables side-by-side with markup like this:
<pre>
{{col-begin}}
{{col-2}}
<center>
{{#invoke:Sports table|main|style=WL
...
}}
</center>
{{col-2}}
<center>
{{#invoke:Sports table|main|style=WL
...
}}
</center>
{{col-end}}
</pre>
 
The obvious way to get rid of the obsolete center tags would be to add a <code><nowiki>|float=center</nowiki></code> to each call of this module. Of course, that didn't work, so I replaced <code><nowiki><center>...</center></nowiki></code> with <code><nowiki><div align="center">...</div></nowiki></code>, which actually worked, to my surprise. I realize that "float" carries extra baggage allowing other stuff to display on the non-float side, and for centering, one would typically want nothing to display on either side, so perhaps centering would need to be accomplished with a parameter other than "float". —[[User:Anomalocaris|Anomalocaris]] ([[User talk:Anomalocaris|talk]]) 22:36, 20 September 2022 (UTC)