Template talk:Calgary federal electoral districts map

(Redirected from Template talk:Calgary federal electoral districts map/testcases)
Latest comment: 15 years ago by Gadget850 in topic Centered?

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