@
Salton Finneger and
Epicgenius:I was trying to figure out how to left justify items within an
Template:unbulleted list, tried online chat and they didn't know, and finally through many trial and errors I figured out to use the style="text-align:left"| on this page, without the quotes (style=text-align:left|) and it worked great!
Trying to justify text in tables, lists, has always been tricky for me to figure out. Is there a way to document this somewhere? Thanks!--
CaroleHenson (
talk)
18:12, 27 March 2014 (UTC)reply
Hmm, I suppose if it works that way, maybe we ought to just pull the quotes out on the template. I wonder if that does any harm. I suppose some experimentation is called for, but no time for it for me tonight. —
Salton Finneger (
talk)
02:30, 28 March 2014 (UTC)reply
I have changed this template (and {{right}}) to use span tags instead of div tags in order to avoid
Special:LintErrors/misc-tidy-replacement-issues, which shows up when div tags are wrapped inside of span tags. Since this template appears to apply only to in-line content, span should be appropriate. Let me know if I have broken anything. –
Jonesey95 (
talk)
12:17, 23 August 2018 (UTC)reply
@
Jonesey95: I used this for left-aligning {{
Wikipedia:Administrators' newsletter/Subscription-box}}. The content in this case is a table, which I don't think constitutes inline content, but using a div to float it to the left will work, and span does not. That being said, I'm confused why you saw the error. Maybe something had a span around the use of {{left}}, and therefore it is the code responsible for the linting error, and not the template itself? — MusikAnimaltalk01:49, 4 September 2018 (UTC)reply
There was a ton of stuff where a span was wrapped around {{Left}}, and it was all in-line. There are a very few cases where Left/Right is wrapped around a div, and this looks like one of them. We'll need to puzzle those out and find a way through. This subscription box template has a |float= parameter, but it doesn't do anything when I try |float=left. Perhaps
Evad37 can help us with the Lua coding in
Module:Sidebar. –
Jonesey95 (
talk)
17:58, 5 September 2018 (UTC)reply
An easy way round this would be to just add a parameter to change the span to a div when appropriate. Or the other way around. I suppose it depends on whether the default restriction should be on where this template is placed (not within span tags if the template output is a div), or on what content can go in it (can't use divs tables etc if the template output is a span). Other alternatives for aligning block-content would be to use {{
stack}} with the |float=left option, or {{
align}} with first parameter left, as those templates uses divs. - Evad37[
talk00:08, 6 September 2018 (UTC)reply
Is it true that if the template uses a div, anything that goes in it will correctly be floated? Personally, I prefer this as I don't have to think about it. {{left}} will just work™. I didn't see the linter errors, though. If there are too many cases where span's are around {{left}}, to the extent we can't fix them without a bot, maybe let's settle for using span within the template. I wouldn't worry about my use case in particular. I can live with the admin news subscription box being on the right :) Thanks for looking into this! — MusikAnimaltalk05:46, 6 September 2018 (UTC)reply