Template talk:Image label begin
From Wikipedia, the free encyclopedia
[edit] Border
Can a border and caption parameters be added to the Image? -- Ganeshk (talk) 19:01, 1 November 2006 (UTC)
- I am guessing it can but especially only applied to the outer div that should not affect the inner one. For example, line-height css style can cause a slight offset when pronounced by floating right. Caption is to be placed between the inner and outer one as well at the bottom. These should be optional because some people may want just the plain labelled image without any extras. -- Zondor 02:41, 2 November 2006 (UTC)
[edit] Justify
Automatically setting text align to justify, an option available in preferences, makes this template look awful. See for example European Union member state, with the option enabled. Having a margin should solve this. --User:Krator (t c) 22:41, 18 June 2007 (UTC)
[edit] Documentation/implementation problems
This is an interesting way of labeling images. Kudos to whoever came up with the idea! However in the documentation I see that the scaling feature is not implemented correctly, and the documentation is inconsistent in describing how the x/y values are being used. As it is documented, it only works for square images. Let me illustrate...
Per the documentation, this example code should result in the word "CENTER" appearing in the center of the image:
{{Image label begin|image=Kansas Locator Map.PNG|width={{{width|426}}}|float={{{float|none}}}}} {{Image label|x=0.5|y=0.5|scale={{{width|426}}}|text=CENTER}} {{Image label end}}
But because it isn't a square image, it produces this instead:
This occurs because the template applies the same scaling factor to both x and y values. Since the width and height is not the same, this is not the correct way to do it. To work using a single scaling factor, the scaling factor must be a multiple of the original width and not just the new width. This also means that the x and y values should be the actual coordinates. In the above example, it should be coded like this (the image is 426x224):
{{Image label begin|image=Kansas Locator Map.PNG|width={{{width|426}}}|float={{{float|none}}}}} {{Image label|x=213|y=112|scale={{{width|426}}}/426|text=CENTER}} {{Image label end}}
Yielding:
Which works even when the width is increased to 600px:
—Mike 08:40, 1 January 2008 (UTC)