This is an archive of past discussions about Template:Navbox generic. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
The following examples show the effects of different CSSpadding values on the table generated by {{Navbox generic}} (users of Internet Explorer 6 for Windows will see no differences in these examples, as CSS padding for tables seems to be ignored). Each is followed by a {{Navigation}}-based template with the title background color changed for comparison.
The first example uses the default value of 5px, which comes from the template's use of class="navbox" (see table.navbox in MediaWiki:common.css). This creates a large amount of padding between the border and the body of the table.
The second example uses a value of 2px, which is the default for class="NavFrame" (see div.NavFrame in MediaWiki:common.css) used by the Navigation template. However, this creates a larger amount of padding than seen in the Navigation template. The reason for the difference is the "cellspacing" (or "border-spacing" in CSS) of the table created by Navbox generic, which is not an issue in Navigation because it does not use tables.
Based on the above results, I suggest making the change shown in the final example. I have tested these examples with three Windows browsers: Internet Explorer, Firefox and Opera. If it does not work correctly in other browsers, please let me know. -- Zyxw08:49, 5 March 2007 (UTC)
These templates are suppose to be basic and not bloated. If you want to make these changes I'd suggest to make them on a site-wide basic instead of template specific. Perhaps it should be the other way around with {{navigation}} getting more padding? —Dispenser02:13, 16 March 2007 (UTC)
Agreed that there should be uniform padding on all navboxes. 2px looks good; see the contast between Toronto and Canada, for example. Whether changes should be made at common.css or here, I don't know enough to tell. Is it possible to strictly center the heading on tables that use navbox collapsible? It looks awkward if any centered subheadings are used below. –Pomte04:54, 16 March 2007 (UTC)
I agree that the best solution would be changes to MediaWiki:common.css that more closely align all settings for the two types of navigation boxes. For example, the padding of table.navbox could be decreased from 5px to 2px, while div.NavFrame is increased from 2px to 4px (navbox needs to be 2px less than NavFrame to create the same appearance). Another area to be addressed is the difference in font sizes. I also think that MediaWiki:common.js should be changed to have navbox and NavFrame templates use the same JavaScript for auto-collapsing. To see why, just look at bottom of the Toronto article with its mix of uncollapsed NavFrame templates and collapsed navbox templates which have 5px more padding (3px from the CSS settings plus 2px from the use of tables). Until such time as those changes are made on a site-wide basis, I see no reason to avoid temporarily fixing the problem directly in this template. The current padding is too large and should be reduced. If the consensus is that padding:0 makes it too small, then let's change it to padding:2px. – Zyxw20:08, 16 March 2007 (UTC)
I'd like to convert Template:Barenaked Ladies over to this standardized template, but the template requires a few subheaders (the grey rows). I don't think any of the existing navboxes accept this style (please point me to one if one exists). I could do it with a listx and no groupx, if you could control the bgcolor of listx's, but you can't. Is there any way we could add a subheaderx tag to accomodate this? Thanks. TheHYPO21:34, 5 April 2007 (UTC)
Along the lines of ChoChoPK's example above, I think what you're after may be achieved using listN parameters without any corresponding groupN parameters, so I've tried this on the {{Barenaked Ladies}} template. At present, the {{Tnavbar}} template used to generate the titlebar has a fontcolor option that doesn't seem to handle colors as comprehensively as I'd thought, so the "v-d-e" and "[hide]/[show]" links it adds are in default blue (i.e. not that visible). User:Netscott, Tnavbar's original designer, may be able to help (or point out something I've overlooked!). Best wishes, David Kernow(talk)07:17, 11 April 2007 (UTC)
If you read his comments in the place he linked to, it's known you can achieve subheadings with listN fields, but it's not ideal - if you notice, the subheadings are not the exact proper width they should be, and additionally, it's html code - and when standardizing navboxes, that type of complexity is frowned upon. TheHYPO17:04, 11 April 2007 (UTC)
I created a navbox generic in userspace for my user page (still up), as an experiment, and found that the v/d/e links are broken. It strips the namespace portion out of the template name. Is this a problem here or with the susbt'd pagename template? MrZaiustalk08:25, 18 May 2007 (UTC)
Doesn't work in userspace because {{Tnavbar}} prefixes all its links with Template:. I don't know of any such template for other namespaces. You can try to substitute and work out how to manually make the three links, or avoid vde by using {{Navbox}} instead. ({{PAGENAME}} isn't a template but a magic word.) –Pomte03:29, 19 May 2007 (UTC)
Is it possible to make a template show by default?
At the bottom of New York City Subway, it would be nice if the subway template were expanded by default, since, well, the article is about the subway. Is that possible? --NE216:43, 23 April 2007 (UTC)
I added the parameter show, which, if set to any value other than collapsed or autocollapse, will expand the navbox. –Pomte01:47, 25 April 2007 (UTC)
is there anyway to do the opposite, make it show by default, but have it automatically disabled for normal pages for those who so choose it? Oldag0703:53, 2 June 2007 (UTC)
<includeonly> isn't necessary in that case - I'm pretty sure it was there only to expand the box in the template page itself. –Pomte22:19, 2 June 2007 (UTC)
I mean it's only an issue if the default value is 1. collapsed, or 2. autocollapse and there's another box on the page. No big deal. –Pomte00:12, 3 June 2007 (UTC)
As you probably know, users on other wiki-languages are working on their own languages, but based on your work. For my specific case, I translate articles for Wikipédia, and trying to use templates uniformaly. Since few days, I'm working on cities of British-Columbia (FR) and I've tried to include this template. With a little search, I've noticed that many languages are using this template, but some are not working proprely.
In certain cases, the default colors are right but the collapse doesn't work, in other cases it's the opposite! My problem is for french : the default colors AND the collapse doesn't work. I think it's the MediaWiki:Common.css or MediaWiki:Common.js, but I'm not sure what I need to request to Admins!? Can someone give me a hand with that? I not really good with "Style sheets". Thanks in advance for your help!
If I want to change the background and foreground colors in the title bar, how do I go about making links (like text) show in the foreground color? I can't see how to do that with this template. Stevie is the man!Talk • Work16:45, 4 June 2007 (UTC)
I'd experiment with titlestyle = background:named_color; color:named_color; ... but currently I'm not sure how well the {{Tnavbar}} template Navbox generic uses in the titlebar handles colors... Regards, David Kernow(talk)16:36, 9 June 2007 (UTC)
Set title = <font color="#abcdef">[[title]]</font>. See {{Elliott Smith}} for an example. While the link color changes, hovering over the link produces the same blue underline. Ugly, but I've found no other way to do it. –Pomte17:31, 9 June 2007 (UTC)
Thanks, this is helpful, but I would also like the v/d/e and show/hide links to show this color (so they can be seen over a dark blue background). I'm starting to wonder if this template is just too limited and search for an alternative, or roll my own. Stevie is the man!Talk • Work17:52, 9 June 2007 (UTC)
On the title itself, a cleaner method is title = [[link|<span style="color:#abcdef;">title</span>]].
For v/d/e/show/hide, {{Tnavbar}} has a fontcolor parameter, which can easily be added to this template by David. It's not the templates' fault; there's simply no convenient way to change link styles. –Pomte18:25, 9 June 2007 (UTC)
Thanks for the additional info. I'm not blaming the template, per se, as I realize it could perhaps be updated, but I wasn't sure if there would be easy agreement to do that. This is something I can be patient with, but I would like to be able to update the colors of {{Louisville}} (based on this template) as soon as David (hopefully) makes the update you describe. Sounds like a positive enhancement. Cheers! Stevie is the man!Talk • Work18:51, 9 June 2007 (UTC)
{{editprotected}}
On the line that transcludes {{Tnavbar}}, please add the fontcolor parameter. Change
Someone who is familiar with the applications should write and test the code. I'll be glad to copy it over here once it's done. — Carl (CBM · talk) 21:22, 22 June 2007 (UTC)
Thnnks. Just looked at it. Is it still in development? I ask because some of the linked words in the title text are invisible. I was thinking that the "white" fontcolor choice would apply to all the text, or that there would be some way to make all the text (linked or not) clearly readable over a dark background. Stevie is the man!Talk • Work14:21, 30 July 2007 (UTC)
1. No it finished. 2. That's a general problem about using dark background. You always need to specify the link tags with another color. Maybe this would be a little more obvious if fontcolor= was just passed to {{tnavbar}} and not color the title bar? It would have the benefit to allow the color of the links differently. —Dispenser15:31, 30 July 2007 (UTC)
Any objections to the overdue edit request? I see no technical controversy about this parameter. I know User:MZMcBride is an admin familiar with templates, so you should contact him directly to get this over with. –Pomte21:22, 1 August 2007 (UTC)
Looking at the testcases, it seems the show/hide links are still blue, and any links added to the title are left unchanged as well. I can easily update the code, however, does anyone want to try to fix these issues first? Cheers. --MZMcBride13:25, 2 August 2007 (UTC)