Template talk:Navbox generic/Archive 1

message: Can somebody modify the code so users can change the color of the template, and that it automatically includes some kind of show/hide function? JQF 19:40, 26 October 2006 (UTC)
replies: text: Have implemented the latter by amending the class of the table used to "navbox collapsible"; as of now, however, this seems to be pushing the template's title off-center... Regards, David Kernow (talk) 12:29, 8 November 2006 (UTC)
thread_title:  Color modification and Show/hide function 

message: I modified the template so that blank or omitted group#= tags don't show up in the final product. --Dinoguy1000 Talk 11:17, 7 November 2006 (UTC)
replies: text: Thanks; have already found this useful here. Regards, David Kernow (talk) 12:31, 8 November 2006 (UTC)
replies: text:  Don't mention it... ;) --Dinoguy1000 Talk 19:24, 8 November 2006 (UTC)
thread_title:  Optional group# parameters 

message: When displayed, a few blank lines seem to appear above the template; cf example on the template's page. I scanned the code in case there were a few hidden carriage-returns, but haven't spotted any... Anyone else seeing this...?  Thanks, David Kernow (talk) 12:16, 8 November 2006 (UTC)
replies: text: This appears to be coming from the table itself. Which is odd because tables don't normally do that, but when I remove the table definition text appear on the immediate next line. However, if I put the table back, even using wiki-markup with no class definition, I get the gap. --CBD 13:55, 8 November 2006 (UTC)
thread_title:  Adding blank lines...? 

message: Heh, I never knew that style="width:auto" would actually work... Evidently, I didn't pay close enough attention to the tutorials that I've read... --Dinoguy1000 Talk 19:37, 8 November 2006 (UTC)
thread_title:  Width 

message: Might this be made applicable to the groupX and/or listX parameters...?  (Hope I'm not missing something obvious.)  When one or more lists contain only one or two entries, for example, a left-align (plus a little padding-left) seems more appropriate for all lists as otherwise there can be a wide gap between a groupX name and the beginning of a short listX...)  Hope that makes sense, David Kernow (talk) 04:35, 9 November 2006 (UTC)
replies: text: I don't know, I would think that if the template has that musch whitespace, it should just be collapsed horizontally... Perhaps that should be enabled by default, via the width:auto CSS code? Any thoughts? --Dinoguy1000 Talk 21:49, 9 November 2006 (UTC)
replies: text: Yeah, that's why I added the 'width' parameter... to allow it to be collapsed down to a size with less whitespace. I agree that left default seems to make more sense (and created it that way back in March), but changing that now could impact alot of templates which were carefully designed to look ok with the centered text that someone added later. It should be possible to add extra parameters to set text alignment for the entire table or (ugh) individual rows. We'd probably need to go through the list and see which ones look better with centering. --CBD 13:01, 10 November 2006 (UTC)
replies: text:  No, just change it to left-aligned. The center-aligned text looks bad, is hard to read, and is redundant when placed inside a box that is already center-aligned on the page. Sure, it'll break a few poorly-designed templates, but it's not worth the drama.. We can allow for extra styling of the cells somewhere, but the current default center-alignment should be done away with. —Down10 TACO 21:00, 20 January 2007 (UTC)
thread_title:  ''align'' parameter 

message: Anyone else seeing the slight misalignment of the  Navbox generic template (as regards the other two templates below it) at the end of the Sudan article...?  If so, I'm not sure how it may be corrected...  Regards, David Kernow (talk) 04:44, 9 November 2006 (UTC)
replies: text: I couldn't find that template on Sudan, but it looks ok on History of Sudan. May be due to some of the subsequent adjustments. --CBD 12:54, 10 November 2006 (UTC)
thread_title:  Misalignment with other templates...? 

message: Is there any way the template can be designed so that you can use any number of lines you need, without all those lines actually being individually represented in the template? I'm especially looking for a method that doesn't use another template, for the sake of simplicity (or something like that). --Dinoguy1000 Talk 22:01, 9 November 2006 (UTC)
replies: text: There is, but it isn't a good idea. You can make 'virtual lines' by inserting  tags in the parameters. Thus 'group1' could have three lines on it and 'list1' three corresponding lists. The reason this isn't generally liked is that screenreaders for the blind describe content by cell rather than matching the visual layout... so they'd hear the three items in 'group1' all at once and then the three items in 'list1' and have to remember the order to match them up... not too bad with three, but gets icky with lots of rows. Alternatively, you could put all the table markup for new rows into a single parameter passed to the template... but at that point you might as well just write the table manually directly on the page. Do we really need navboxes with more than ten rows though? --CBD 12:46, 10 November 2006 (UTC)
thread_title:  ''N'' lines 

message: I'd just like to mention that even though I suck at doing anything with templates so I'm not going to fix it myself for fear of breaking half the 'pedia, I don't like this new centeredness thing. Just my two cents. Thanks, Mak (talk) 03:30, 10 November 2006 (UTC)
replies: text: How do you mean? IIRC (is my memory really that bad?), the template was centered before all these changes as well... Indeed, that seems to be more or less the norm amongst many nav templates on WP. --Dinoguy1000 Talk 09:54, 10 November 2006 (UTC)
replies: text: Somewhere along the line the template was set to 100% width... at which point 'alignment' should be irrelevant - left, right, or center it still takes up the full width of the screen. When I made the width optional I left it defaulted to 100% and thus I'd think it should look unchanged for existing uses without the '|width=' parameter. I used 'center' as the default alignment because that's the way most navboxes are displayed, but '|align=left' or '|align=right' can now be added to the template call to reposition it. --CBD 12:40, 10 November 2006 (UTC)
thread_title:  Unfair whining 

message: Can we get a thinner border (actually, the "cellpadding" or whatever, between the outer border and the box itself)? It's something like 6 or 8px now, and it looks too "fat". Duja► 12:34, 19 December 2006 (UTC)
replies: text: See my comments below under #Changing CSS padding of table which explain the reason for this and give a solution. -- Zyxw 08:55, 5 March 2007 (UTC)
thread_title:  Border too thick 

message: I added 4 more optional items, adding up to 16 because... I need them. Is that a problem? Duja► 13:02, 19 December 2006 (UTC)
replies: text: I added four additional lines to allow for larger navtemplates in the future. --Dinoguy1000 Talk 20:39, 19 December 2006 (UTC)
thread_title:  16 items 

message: The colour parameter only affects the titlebar colour. This usually means it will clash with the default blueish colour that's used for the "group" cells. Is it possible to either add an extra parameter for the group cells, or have the current parameter cover the group cells too? Templationist 20:59, 17 January 2007 (UTC)
replies: text: This is something I forgot to mention before, so thanks for the reminder. Along the lines of the thread above, there may be a more elegant method using parameters with the class="navbox collapsible..."; otherwise, my first thought would be to convert all   to  or the like, i.e. where the parameter  can be used to set the color. Yours, David Kernow (talk) 08:02, 18 January 2007 (UTC)
replies: text: I've added a new group-style parameter to the template. This allows you to specify CSS values to apply to the "group" cells. For instance: background-color: #nnnnnn; text-align: (left|center|right); vertical-align: (top|middle|bottom)...etc. This option overrides any styles that are applied to the entire table. Below is an example showing altered title and group backgrounds with the group text aligned to the right and top. It also shows how the text-alignment of the table (center) is overridden by the text-alignment of the group (right). -- Zyxw 10:26, 8 February 2007 (UTC)
replies: text: Thank you. Putting white-space:nowrap; in group-style is useful for visual effect and reducing vertical space. Pomte 08:55, 16 February 2007 (UTC)
thread_title:  Colour parameter