Template talk:Border

Latest comment: 2 years ago by Anomalocaris in topic Block version of this template needed

Untitled edit

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)Reply
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)Reply
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)Reply
I don't know what the problem is, but someone created Template:Border-notinline, maybe you could try it.

Interwiki edit

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

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

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

Please add is:Snið:Rammi to the interwikilist. --Jóna Þórunn 17:29, 4 November 2006 (UTC)Reply
Please add io:Template:Bordo to the interwikilist. Marc Venot 23:11, 14 February 2007 (UTC)Reply
  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)Reply

Proposed Modification edit

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)Reply

Is there a need for this? / Fred-Chess 08:08, 24 August 2006 (UTC)Reply
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)Reply
But the main page uses Template:Border-notinline? / Fred-Chess 18:18, 24 August 2006 (UTC)Reply
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)Reply

Extra space in Firefox and Opera edit

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)Reply

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)Reply

Do we need this anymore? edit

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

 

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

AWESOME! At last. Thanks for the information ;) Parutakupiu talk || contribs 18:33, 31 May 2007 (UTC)Reply
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)Reply
If you want to use this template to an image, that's useless (there is also |style= parameter in the image syntax for this purpose), but if you want to use this templates for other area (such as text), you can still make use of this template for customize purpose. -- Great Brightstar (talk) 12:49, 7 May 2021 (UTC)Reply

Colour edit

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)Reply

No padding-left in Firefox edit

There is no left-padding for article text for {{Greek governmental bonds 2 years graph}} in European sovereign debt crisis when using Firefox. IE is fine.--Kozuch (talk) 17:22, 22 August 2011 (UTC)Reply

I don't think this template is the cause of the lack of margin. {{Border}} only does the inner border around the image. — Blue-Haired Lawyer t 12:48, 23 August 2011 (UTC)Reply
Ok, I see.--Kozuch (talk) 13:20, 23 August 2011 (UTC)Reply
You can try |style2= if you want. --Great Brightstar (talk) 14:17, 10 November 2016 (UTC)Reply

Template breaks line in Chrome edit

In Chrome, this template breaks the line it is used in, see e.g. Scrabble#Notation_system. Works fine in Opera. Does anyone know what's the matter and what can be done about it? sephia karta | dimmi 18:14, 12 March 2012 (UTC)Reply

Recently I improved this template, it should works fine in many web browsers. --Great Brightstar (talk) 14:17, 10 November 2016 (UTC)Reply

Border on bar percent templates edit

Is there any way to put a border around an entire bar percent item inside a bar box? Currently, using the border template with an element which is a bar percent template only puts the border around the text in the first column of the bar percent item as can be seen here: {{bar box |bars= {{bar percent|bar percent without border|red|30}} {{border|{{bar percent|bar percent with blue border|green|40}}|color=blue}} {{bar percent|bar percent with light grey background|blue|20|bg=#EEE}} }} --Gravecoins (talk) 16:48, 1 June 2017 (UTC)Reply

Gravecoins, that won't work because {{bar percent}} generates table rows, not div elements. I have added a |bg= parameter to that template for highlighting a row. Frietjes (talk) 15:05, 30 June 2017 (UTC)Reply
Frietjes thank you very much! This is good enough for what I needed. --Gravecoins (talk) 23:09, 30 June 2017 (UTC)Reply

Block version of this template needed edit

A block version of this template is needed to avoid div-span-flip lint errors. It would be the same as the existing version except it would use <div>...</div> instead of <span>...</span>. —Anomalocaris (talk) 18:50, 13 July 2021 (UTC)Reply