Template talk:Left

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Getting left-justify to work[edit]

@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]
Ok, thanks for considering it... and if there's something I can do I'd be happy to help.--CaroleHenson (talk) 02:42, 28 March 2014 (UTC)[reply]
It would work fine with or without the quotes. May I see the article in context, CaroleHenson? Epicgenius (talk) 12:54, 28 March 2014 (UTC)[reply]
It's two templates: Template:Shakers sidebar and Template:Shaker music.--CaroleHenson (talk) 14:49, 28 March 2014 (UTC)[reply]

span instead of div[edit]

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? MusikAnimal talk 01: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 [talk] 00: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! MusikAnimal talk 05:46, 6 September 2018 (UTC)[reply]

My edit has been reverted by Cards84664 without explanation. I asked for an explanation at their user talk page. – Jonesey95 (talk) 19:53, 18 November 2018 (UTC)[reply]

I was also unaware of any visible errors in the syntax. I still don't see what the problem is. S-line templates were broken on articles like Shimo Station#Adjacent stations. Reverting your edit fixed the problem visually. Cards84664 (talk) 20:19, 18 November 2018 (UTC)[reply]