Template talk:Border

From Wikipedia, the free encyclopedia

This template can be used to put a frame around a picture (or anything else). The frame is the same as in [[Image:Foo|thumb]] or [[Image:Foo|frame]], but without displaying a caption.

Demo

I fixed so it now works in bullet lists...
  • It should't be like this
Fred-Chess 08:37, 5 May 2006 (UTC)
There's a problem, after the templates, the text doesn't continue in the same line, that is a big problem, for instance in {{JAPf}}. Mariano(t/c) 09:54, 1 June 2006 (UTC)
Now there is another problem, in some pages with flags, they don't display the frame, such as the 2006 FIFA World Cup - Group A with Poland, and others of Groups of FIFA 2006 World Cup. Rbb l181 18:44, 17 July 2006 (UTC)
I don't know what the problem is, but someone created Template:Border-notinline, maybe you could try it.

Contents

[edit] Interwiki

Could an admin add an interwiki link to no:mal:Border? Mathias-S 13:38, 14 August 2006 (UTC)

Done. / Fred-Chess 17:43, 14 August 2006 (UTC)

ja:Template:Border--saburny 15:12, 14 October 2006 (UTC)

Please add is:Snið:Rammi to the interwikilist. --Jóna Þórunn 17:29, 4 November 2006 (UTC)
Please add io:Template:Bordo to the interwikilist. Marc Venot 23:11, 14 February 2007 (UTC)
Y Done. I have added the 3 listed above. These are now placed on the documentation (Template:Border/doc) page which is currently not protected so in the future you can add them yourself. (I'm not an admin) --Jeremyb 08:09, 11 August 2007 (UTC)

[edit] Proposed Modification

Perhaps the {{border}} template could be modified to allow an alignment attribute to be included. Thus the code would be:

{{#if:{{{2|}}}|<div class="t{{{2}}}">}}<span style="display: inline;"><span style="display: table-cell; border-collapse: collapse; border: solid 1px {{{color|#ddd;}}}">{{{1}}}</span></span>{{#if:{{{2|}}}|</div>}}

So {{border|[[Image:Flag of Washington, D.C..svg|100px]]}}|right}} would align the image to the right. -- tariqabjotu 15:57, 23 August 2006 (UTC)

Is there a need for this? / Fred-Chess 08:08, 24 August 2006 (UTC)
It wouldn't hurt. I was just thinking it would be useful for the ITN news section when right-aligning a bordered flag would be needed. -- tariqabjotu 17:07, 24 August 2006 (UTC)
But the main page uses Template:Border-notinline? / Fred-Chess 18:18, 24 August 2006 (UTC)
I tried to apply this, but it generated an error; I think there's some mis-matched curly-brace. Also, I think there is a typo in the example(the curly braces after 100px?). Please correct this(or clarify where I misunderstood (more likely)), and re-add the Editprotected notice. Thanks! —Preceding unsigned comment added by JesseW (talkcontribs)
This modification is the best imo. At least it gives a choice to have images surrounded or not by text. Can't someone modify the script? Parutakupiu talk || contribs 04:52, 19 November 2006 (UTC)

[edit] Extra space in Firefox and Opera

I've noticed an issue with the border template in Firefox and Opera where it seems to add a space before the image. This came up in the WWII template, where a border was added to the Japanese flag. In IE it renders just fine, but in Opera and Firefox it causes the flag to be an extra space to the right, creating a bit of a skewed appearance. I was wondering if there was a simple way to resolve this, or if it's just a quirk of certain browsers' way of rendering. ~ El Cid 22:18, 19 February 2007 (UTC)

Actually, the border around the Japanese flag is part of the image itself, and is not generated by the border template. Its offset to the right is because of the dimensions of the image, not a rendering error. oobugtalk/contrib 19:49, 19 March 2007 (UTC) (edit: realized after posting that the subject had come up precisely a month ago; I'd read the date and thought it was a current issue. Please ignore my blathering ignorance. - oobug)

[edit] Do we need this anymore?

MediaWiki can automatically put a border around images without this template. For example: [[Image:Flag of Japan.svg|180px|border|Japan]]

Japan

--MK 18:25, 31 May 2007 (UTC)

AWESOME! At last. Thanks for the information ;) Parutakupiu talk || contribs 18:33, 31 May 2007 (UTC)
Is this a MW1.11 feature, or does it only work for SVG images? My private wiki (running 1.10) doesn't seem to have this feature when I try it on JPGs or PNGs (my server rejects all SVGs for some reason). --Billdorr 23:52, 31 May 2007 (UTC)

[edit] Colour

The border is too light, could someone darken it so that it's clearly visible? Thank you. : ) Louis88 (talk) 12:29, 22 April 2008 (UTC)