Template talk:Calgary federal electoral districts map

Latest comment: 14 years ago by Gadget850 in topic Centered?
WikiProject iconElections and Referendums Template‑class
WikiProject iconThis template is within the scope of WikiProject Elections and Referendums, an ongoing effort to improve the quality of, expand upon and create new articles relating to elections, electoral reform and other aspects of democratic decision-making. For more information, visit our project page.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
WikiProject iconCanada: Geography Template‑class
WikiProject iconThis template is within the scope of WikiProject Canada, a collaborative effort to improve the coverage of Canada on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
Taskforce icon
This template is supported by WikiProject Geography of Canada.
WikiProject iconMaps Template‑class
WikiProject iconThis template is within the scope of WikiProject Maps, a collaborative effort to improve the coverage of Maps and Cartography on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Problem using this in infoboxes edit

There is a problem using this map template as an image parameter within {{Infobox Canada electoral district}}. For example, the infobox in Calgary East displays a stray "[[Image:" text above the map, and "|200px]]" below. That's presumably because the infobox builds the image string from separate infobox parameters, rather than from a whole image spec such as 200px. Either this map spec or the infobox needs to be fixed. Dl2000 (talk) 01:55, 16 October 2008 (UTC)Reply

After looking at a few things, it seemed more effective to fix {{Infobox Canada electoral district}}; a new imagemap parameter can be used to properly show the linkmaps, rather than the regular image parameter. Seems to work so far. Dl2000 (talk) 02:17, 16 October 2008 (UTC)Reply

Centered? edit

Looking at the markup, it appears the intent is for the map to be centered:

<div style="position: relative; width:155px; align:center; border: none; margin-left:12px;">

But, align:center; does not work with a block element such as <div>...</div>. To center the map, we need to set margin:auto;:

<div style="position: relative; width:155px; border: none; margin:auto;">

Sandbox version at {{Calgary federal electoral districts map/sandbox}}, testcases at Template:Calgary federal electoral districts map/testcases. ---— Gadget850 (Ed) talk 00:42, 24 June 2009 (UTC)Reply