Jump to content

Template talk:Float left

Page contents not supported in other languages.
Add topic
From Wikisource
Latest comment: 5 years ago by Nizolan in topic Broken margins?

Broken margins?

[edit]

I believe that the margins on this template are not working. At least in every instance of it I can find, no margins are being added. This is confirmed via "inspect element," which shows the template is generating <span style="float:left; margin:0 0 0 0;"> tags. unsigned comment by Mathmitch7 (talk) 13:45, 26 December 2018‎.

@Mathmitch7: This template has been mucked around with so much I would not trust it any more. What do you want to achieve (and where) and perhaps a trustworthy alternate approach might be found?
In point of detail the template does produce usable margins in its current form only when margin units are specified—e.g.{{float left|Some text|3em|5px}}—something which was not true at various points in its development history! 114.73.65.234 22:24, 26 December 2018 (UTC)Reply
OK, sounds good. I ended up using {{float left/s|3em|5em}} or similar, which worked out fine. Who all is working on this template these days? Mathmitch7 (talk) 23:19, 26 December 2018 (UTC)Reply
Downright embarrassing when the (documented) behaviour of a template and its "/s" variant differs. The (current) fault is the Example documentation for {{float left}} which implies dimensionless parameters are acceptable when in fact they achieve nada. (In fact the demonstration code proves they do not work!) At this particular instant anybody can fix this. 114.73.65.234 00:03, 27 December 2018 (UTC)Reply
@114.73.65.234, @Mathmitch7: The problem is simply that the template itself doesn't specify "em", hence why Mitch's example works and the examples previously given in the documentation don't. I've updated (diff) the documentation to reflect how the template actually functions. Really the template itself should probably be altered so that all the other instances of it work, but I didn't want to make such a far-reaching change myself. —Nizolan (talk) 01:20, 3 June 2019 (UTC)Reply