I have added a tracking category for unknown parameters, linked from the documentation. It appears that most of the errors stem from the erroneous presence of |align= in the documentation for some time. It should generally be replaced with |float= where it is found. – Jonesey95 (talk) 15:10, 4 October 2023 (UTC)[reply]
Hi, is there a way to center the template inside the cell of the table? It messes up the width of the columns and also is ugly.
So far i've unsuccesfully tried adjusting the float parameter, using style="text-align: center; and many other things...
Thanks in advance.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
I experimented in the sandbox and was unsuccessful. The documentation appears to be incorrect: there is no such option in CSS as "float:center". The template creates a table with class=infobox, which fights hard against center alignment. Someone else may have an idea. – Jonesey95 (talk) 02:12, 24 December 2023 (UTC)[reply]
"center" is not a valid property value for either float or clear, and I have removed that bit from the documentation. In CSS, centering elements that is not text is done by setting the margin. If you really want to do what you're trying to do without altering the source code of {{External media}}, then you should hack into bodystyle with a CSS injection (emphasis added):
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Hmm... ok. I've made two edits to List of burial places of classical musicians: Solution 1, Solution 2. Solution 1 uses {{External media}}. Solution 2 uses standard external links. Note that, in Solution 1, I changed the width of the pictures from 100px to 120px. The "External image" header is 106px long. By widening the pictures, the "External image" text is not broken in half, with the word "External" on one line and the word "image" on the other.
No problem! It still feels a bit weird though, a table inside a table. I don't mind, but it's possible that other Wikipedians will be against them and want them gone. I've seen Wikipedians bicker over the tiniest things, really.
Anyway, I think it would be a good idea to add a margin parameter to {{External media}}. That way, we don't have to hack into it when it's used inside a table.
I can't edit the template, because I'm not an administrator or template editor. But you can submit an edit request by going to View source and hitting the button that says "Submit an edit request". Cheers, Manifestation (talk)19:33, 24 December 2023 (UTC)[reply]
|float=center is working now. It's not great programming practice, since float=center is not a real option, but I have worked around it using the hints above. – Jonesey95 (talk) 23:32, 24 December 2023 (UTC)[reply]
I would be fine with that. The discussions in the archives of this talk page seem mostly to be confused about align versus float. |align= seems to make more sense from a syntax perspective. Feel free to adjust the sandbox code. – Jonesey95 (talk) 14:00, 25 December 2023 (UTC)[reply]
float and align do the same thing, except for |float=none. It would be nonsensical to have a |align=none, because it's impossible for an element not to be aligned.
I do believe it's better to have an align parameter instead of float, because for the casual Wikipedian who knows nothing about HTML, the word "align" sounds more logical and familiar than the word "float".
I think we have two options here. 1) Alter all transclusions of {{External media}} that have float, and change that to align; 2) Turn align and float into aliases, except for |align=none, because it's impossible for something not to be aligned. In /sandbox, I've done the latter. Cheers, Manifestation (talk)19:13, 5 January 2024 (UTC)[reply]