Template talk:Userboxtop

CSS problem with floating
There is a problem with the CSS of the userboxes. If I have some userboxes on my page, they don't stay one under the other, but they have the typical css floating behaviour of staying on the side opposite of the allignement. What I say is that they aligne orizzontally, not vertically. Try it. The solution is to put a clear: attribute in the css of the box. See my User page for more info. - (Posted by User:Giandrea)

Missing parameter info
The "Usage" section should describe what the parameters can be. I have no idea what the valid alignments are for "align=", for instance... left, right, center, none? What are the defaults if you don't have a parameter, and what are the other defaults if you have a parameter but leave it blank after the equal sign? --Tifego 00:23, 12 March 2006 (UTC)
 * Expanded the docs signicantly. —Locke Cole • t • c 07:29, 2 April 2006 (UTC)

Problems in XHTML validation (for multiple userboxes)
There's a problem where using multiple userboxes may cause the page to no longer a valid XHTML when validating by the W3C XHTML Validator. The reason is the table's id property "id=userboxes" is being redefined for each additional userboxes, and this is not allowed under XHTML 1.0 Specifications.

Perhaps removing that id property altogether would help?

=== FourBlades 06:11, 9 June 2006 (UTC)


 * I think the id should be made a class instead. In the XHTML spec, an id can only appear once, but a class can appear any number of times.  However, making the change would require everyone taking advantage of custom CSS to hide userboxes to update their CSS. --Tim1988 18:09, 10 June 2006 (UTC)


 * So the obvious solution is the addition of the class attribute, broadcast an advance notification of the removal of the id attribute (say 3 months notice); removal of the id attribute at the time specified. Cain Mosni 12:47, 11 September 2006 (UTC)

Userbox - Userboxes?
I changed the title at the top of the template from "Userbox" to "Userboxes". The way I see it, most users will be using this to "package" more than one userbox, so the plural is needed.

The last time I made this change, I was inexplicably reverted by User:Brendenhull. I see from his talk page however that this is not the first time he has reverted legitimate edits without explanation, and I see no reason why this shouldn't have a plural. Anyone agree? --Tim1988 18:05, 10 June 2006 (UTC)
 * P.S. I suppose there could be a way to programmatically have "Userbox" or "Userboxes" depending on how many userboxes there are.

Userboxbreak
Is there any way to give Userboxbreak the same parameters to set as Userboxtop? There are groups of templates that I would like to differentiate by color, and since using Userboxtop isn't an option, as one box slides right under another in IE (though they look fine in FireFox), Userboxbreak needs to be more customizable. I am still leaning how to make templates by practicing on userboxes, so I may be out of my depth on this one. - LA @ 12:09, 12 August 2006 (UTC)

Top text
After some of the recent changes to this template, having no text at the top (to replace "Userboxes") doesn't seem to work anymore. When I use the parameter toptext= (with nothing after the equal sign), an apostrophe shows up at the top. When I use toptext="", "" shows up, and when I use just toptext, toptext shows up at the top. Can't think of any other ways to do it, and I don't understand the way all the code works, so can anyone help me? Thanks! --Galaxiaad 04:12, 11 September 2006 (UTC)
 * I've fixed it. The problem started when the toptext parameter was bolded with wiki markup. When the toptext parameter was blank, the three apostrophes from each side came together, forming . The apostrophes are interpreted as (correct me if I'm wrong) bold, italics, then one apostrophe of text. I switched the bold and the big tags, so now when toptext is blank, the code reads   and renders correctly. You may need to purge the cache or make a null edit before it displays correctly.  Pagra  shtak  15:26, 11 September 2006 (UTC)

Why didn't you just use the &lt;b>&lt;/b> tag? It doesn't have that problem. JustinCB (talk) 21:13, 10 January 2018 (UTC)

Margins
It's nice that the box allows the user to select alignments, but it was clearly originally designed with right alignment in mind, and the margins are fixed at zero, except for the left, which looks all cock-eyed, when the box is left aligned. Whilst it is on my list of things to do when the case of circular tuits arrives I don't yet know template syntax, but I know what needs to be implemented: That will take care of correct margins for all 3 alignments - left, center, right. Cain Mosni 12:59, 11 September 2006 (UTC)
 * If the alignment is not "left" there needs to be a style element of "margin-left: 1em"
 * If the alignment is not "right" there needs to be a style element of "margin-right: 1em"
 * There is one more. See Template talk:userboxtop below.  I like to nest my boxes.  The inner ones need no margin at all. Will (Talk - contribs) 08:41, 27 January 2007 (UTC)

Reminder
Sorry if this sounds like I'm talking down to everyone, but I'd like to remind all editors that this template is widely used. A recent good-faith edit caused numerous problems around various users' pages; when I first noticed it, I thought it was related to a new userbox that I was adding. Then I ran across it on several other editor's pages. When I saw it screw up a page on my userpage that I hadn't modified in a while, I realized where the problem might lie.

Please, if you make any changes (even seemingly innocuous ones, like removing the center tag), use the "What links here" tag and check out a wide sampling of pages to ensure that you didn't accidently break a page. EVula 15:15, 12 September 2006 (UTC)

I think somebody changed something in the template text so that text now wraps on the side of the box, whereas before it stayed beneath it. This is now a problem on my user page, in the section Edit History. Not sure how to fix it now, though… --Fbv65 e del / &#9745;t / &#9755;c || 01:41, 14 September 2006 (UTC)


 * When did you first notice the problem? I just switched the "align" tag to a CSS float declaration, but it didn't change anything on your page (I also tried wrapping the list on your page with a div tag with a left margin, but that didn't help, either). EVula 02:30, 14 September 2006 (UTC)

Could the margin-left be reduced when the box is a child of another user box?
I am willing to pass a parameter that defaults to no-child if needed. I just don't like wasting the space. Will (Talk - contribs) 07:34, 17 January 2007 (UTC)
 * If I don't see a reply before too long, I may create my own variants of userboxtop, userboxbreak, userboxbottom, and babel to solve the problem. If I do that, they will be listed at User:Will Pittenger/templates. Will (Talk - contribs) 09:26, 28 January 2007 (UTC)
 * Hmm... not sure about the best way to approach this. I'm kind've actually thinking that you might be able to make this happen with the current paramaters available -- see this example (permalink), which I'm guessing isn't quite what you're looking for, but it seems to be a step in the right direction. Luna Santin 03:33, 29 January 2007 (UTC)

Better. (It helps that someone with better CSS skills than myself got involved. :D) Babel doesn't recognize the extra-css parameter. However, I have since been thinking about making my user box container collapsible with something like the class navframe. Can extra-css do that too? The outer container would be expanded by default with the inner ones collapsed. Will (Talk - contribs) 06:59, 29 January 2007 (UTC)
 * Hm... might be in over my head, here; haven't done too much with NavFrame, but I suspect that if you're planning to use it, it'll be easier to set it up yourself (instead of using a template) (in part, most of the templates invovled here weren't built with it in mind). Did some fiddling around, things aren't quite working -- permalink, I suspect there's some elaborate conflict between the CSS used in userboxes and the CSS/JS used in NavFrame. In the meantime, you may be able to get some use out of userboxbreak. Luna Santin 09:12, 29 January 2007 (UTC)

I'm already using userboxbreak. Will (Talk - contribs) 09:35, 29 January 2007 (UTC)
 * I made the left margin settable as a parameter. --CBD 22:13, 31 January 2007 (UTC)

th interwiki
Please add th:แม่แบบ:กล่องผู้ใช้บน for interwiki link. Thanks --Jutiphan | Talk  - 05:35, 4 February 2007 (UTC)
 * [[Image:Yes check.svg|20px]] Done. Luna Santin 08:07, 4 February 2007 (UTC)

th interwiki 2
Please add ru:Шаблон:Userboxtop for interwiki link. Thanks... Csahes 00:50, 19 February 2007 (UTC)

XHTML validation redux
The  code should be removed or the CSS id should be made configurable (defaulting to "userboxes"). This will allow a page with more than one of these boxes (or a Babel box) to validate. It may be worthwhile to make it a CSS class instead, as suggested above. The only repercussions I can see would be if there are users using the id to do styling in their personal CSS. This seems unlikely since they would be the only ones to see it, but I guess it could be used to suppress userboxes or something.

Also, the "name" attribute on the table doesn't really serve any purpose (and it's also not a valid attribute for the table tag). Mike Dillon 03:31, 23 March 2007 (UTC)


 * I came to follow the editprotected tag. Why was the id set originally? What will be the likely effects if it is removed? CMummert · talk 05:22, 23 March 2007 (UTC)


 * It seems to have been added in this edit. The edit summary was "trying something". There are no references to "#userboxes" in any of the site-wide CSS. If it is removed, it will only have an effect on individual users who have used the id as a selector in CSS rules to either style or hide the userbox container. I went through the first 15 pages of this search and didn't see any references to the id in any user CSS files, so there will likely be no effect (except making it possible for the pages using multiple boxes to validate). Mike Dillon 05:32, 23 March 2007 (UTC)


 * Thanks for the info. I want to wait for a couple days to give others a chance to comment.  If nobody can name a reason why the id needs to stay then I'll remove it. I just want to be cautious. CMummert · talk 05:55, 23 March 2007 (UTC)
 * I'm no CSS wizard by any stretch of the imagination, but from what I know the argument in favor of the change is sound, and I haven't figured any problems that would result (worst that happens is a few user CSS subpages need updating, and I haven't seen references to this, either). – Luna Santin  (talk) 22:01, 23 March 2007 (UTC)


 * The intent was to allow users to hide userboxes entirely by editing their user-specific CSS. I have no idea if it's actually in use or not, but I am annoyed that anyone would think this was a problem: the problem only occurs if people use this template incorrectly (that is, use it more than once on a page). The "proper" way to break apart userboxes would be to use userboxbreak. Having said that, using a CSS class would work as well, but would break the userbox hiding functionality for those that may be using it.


 * If such a change is made, please be certain to update the docs to reflect the change as well. As an aside, what is the significance of userspace pages being XHTML compliant? I could see the problem here if this were something used in article space, but this seems like nit-picking. :P —Locke Cole • t • c 08:37, 24 March 2007 (UTC)


 * I guess there is no compelling reason for pages to be XHTML compliant. The one reason I can think of is that being able to validate the page is one method that can be used to ensure that the page will work right in multiple browsers.


 * I'm familiar with userboxbreak and I'm using it, but there are some people who put the userboxes into their own sections, in which case they need more than one container. A more significant issue is that Babel and Babel-N also use it, so pages that use both Userboxtop and a Babel template will have duplicate "userboxes" ids.


 * I guess I'll do a more exhaustive search for people that are actually using the functionality in their personal CSS before recommending that we change it to class="userboxes". Mike Dillon 15:27, 24 March 2007 (UTC)


 * Removal without any other method of hiding userboxes is, to me, unacceptable. The class idea would be a reasonable compromise, however, those that are using the ID should be informed before the change. The "name" attribute was added as basically a copy-paste from some other CSS used in another template. At the time, I was more interested in making it possible to hide userboxes rather than making everything CSS/XHTML compliant (this was, I believe, right around the time userboxes were being deleted out of process). I simply assumed the "name" attribute may have been a compatibility inclusion for some broken/older browser that didn't support the "id" attribute. If there is no compatibility reason to include it, I would favor it's removal. —Locke Cole • t • c 08:37, 24 March 2007 (UTC)

I set the page size on the search for "userboxes" in the user namespace to 1000 and went through all 9 pages of the search. The only user CSS file that showed up was User:Beetstra/userboxes.css, which doesn't refer to the selector. It should be safe to change this to use class="userboxes".

Thinking about this a little more, another side effect of having duplicate ids besides the lack of validation is that it isn't possible to write straightforward JavaScript that can toggle the display of userboxes (if anyone wanted to do that). Mike Dillon 16:00, 24 March 2007 (UTC)


 * editprotected. This has gone 2 days with no new comment. I am going to remove the id, and we'll see if anyone even notices. CMummert · talk 22:42, 26 March 2007 (UTC)

Can't align center
Aligning the box in the center doesn't work.--Richard (Talk - Contribs) 16:36, 3 April 2007 (UTC)


 * Can you give an example of source code for what you are trying to do? CMummert · talk 23:03, 3 April 2007 (UTC)

This:

Making it align center doesn't work.--Richard (Talk - Contribs) 21:55, 11 April 2007 (UTC)


 * It was broken in this revision. A change was made from the deprecated "align" attribute to using a CSS float property, but float doesn't support "center", just "left", "right", and "none". The pure CSS way to center is using "auto" for the left and right margins. As a workaround, you can do . The bottom margin is 0.5em because that's what this template currently uses. Mike Dillon 23:19, 11 April 2007 (UTC)


 * I was just about to make a similar comment. I am going to fix the documentation. CMummert · talk 00:12, 12 April 2007 (UTC)

Firefox better support needed
I just want to let you guys know that rendering under Firefox and Opera (Internet suite) does not work well with these set of templates as it partially covers the first box and other topmost boxes userboxes when using the hide/show feature. It seems the work for a solution on this problem has been neglected for sometime... like months. The template works fine under Internet Explorer. I really want to use this template but I cannot because of this. Getonyourfeet 11:29, 4 April 2007 (UTC)


 * Nevermind I found a workaround and it is better... just instead of adding multiple 'div class="NavContent"' sections inside a single "Userboxtop Userboxbottom pair" resulting in multiple hide sections under one single "Userboxtop Userboxbottom pair"... the solution was just to create many multiple "Userboxtop Userboxbottom pairs" for each groupings of selected content... instead of many 'class="NavContent"' groups from the previous idea. One cool side feature I like is that you can also hide a Userboxtop Userboxbottom pair(s) within another one Userboxtop Userboxbottom pair... Really useful if you want to hide huge volumes of content. Getonyourfeet 14:01, 6 April 2007 (UTC)

margin-right
editprotected

I would like to add margin-right to this template so one can have the same margin on both sides if one would like it. From this:

to this:

--MrStalker 23:27, 6 April 2007 (UTC)


 * It needs to default to 0, not 1, to preserve the current behavior. Alternatively, you can just use  to get that effect. Mike Dillon 00:03, 7 April 2007 (UTC)


 * In the interest of avoiding creeping featurism, I don't think this change is needed. There is a workaround that doesn't require a change to this template, and in most cases you could just write your own code instead of using this template. CMummert · talk 01:45, 7 April 2007 (UTC)


 * Okey, thx anyway. --MrStalker 09:01, 7 April 2007 (UTC)

id=
editprotected Can someone give this an id? perhaps id="userboxtop". Thanks. -Indolences 16:39, 19 April 2007 (UTC)


 * It shouldn't have an id because there can be more than one of them on a page. Why do you want an id? Mike Dillon 16:57, 19 April 2007 (UTC)


 * Yes, the id was recently removed per the section XHTML validation redux above. You should be able to use the CSS class instead. CMummert · talk 17:59, 19 April 2007 (UTC)
 * Oh duh I didn't even see the table.userboxes { display: none; } on the template page. Thanks. -Indolences 19:45, 19 April 2007 (UTC)

Text
How can I align normal text next to a userbox. I would like some help. Sean90 03:42, 14 June 2007 (UTC)

IW
I've created no:Mal:Brukerbokstopp. Please add a interwiki. Nsaa 12:50, 20 June 2007 (UTC)


 * done. &mdash; Carl (CBM · talk) 03:17, 21 June 2007 (UTC)
 * Thanks. Nsaa 21:02, 21 June 2007 (UTC)

Please add  too. Thanks. (Could the iw and the documentation be moved to eg. /doc and unprotected?) –Zinjixmaggir 09:13, 3 July 2007 (UTC)


 * [[Image:Yes check.svg|px]] Done, although I have yet to move any documentation, I'll get on that in a moment. Nihiltres(t.c.s) 19:02, 3 July 2007 (UTC)

Scrolling
Is it possible to make this a fixed size and include a scrollbar in it? I think I've seen that somewhere... --Gawaxay 18:26, 9 September 2007 (UTC)

Usage problems
It seems that you can't use the template without at least one '|' -character after the template name, I wrote like:

and it didn't work. LasseS 11:33, 27 September 2007 (UTC)

Collapsable
Can someone please add the collapsable feature to this template, so that it is possible to have the template hidden?  Yahel  Guhan  06:35, 14 October 2007 (UTC)


 * I know this old but I agree, it would be helpful if someones added a collasible parameter.-TriiipleThreat (talk) 17:17, 15 January 2010 (UTC)

Documentation
Please move all documentation text (everything between the  tags) onto the subpage Userboxtop/doc and place the template reference documentation in its place on userboxtop. --Dinoguy1000 Talk 01:29, 31 October 2007 (UTC)


 * ✅ Done - but I used en lieu de .  Nihiltres ( t .l ) 00:48, 2 November 2007 (UTC)

Documentation
editprotected

Someone please change template doc to documentation, as the first redirects to the second. — Dino guy  1000  18:45, 20 February 2008 (UTC)
 * Not done There's no point in changing a heavily used template just to bypass a redirect; it would create work for the servers for no good reason. --ais523 19:19, 20 February 2008 (UTC)
 * Fair enough... I'll have to keep that in mind in the future (and just surreptitiously update such redirects in tandem with other edits ;) ). — Dino guy  1000  19:04, 21 February 2008 (UTC)

Unbold header
Can an admin please modify font-weight: bold to be normal—I have a use for it where I don't want the header in bold, and if someone wants it in bold they can choose to do so when using the template. Thanks. --Eustress (talk) 04:48, 23 January 2009 (UTC)


 * Probably not... by now, this template has thousands of uses across Wikipedia that rely on the bolding, so just removing it would result in a lot of breakage. A switch allowing you to disable the bolding would be simple enough to add, though (something along the lines of ). 「ダイノ ガイ  千 ？！」(Dinoguy1000) 18:33, 23 January 2009 (UTC)

edit link for use in templates.
Could there be a named parameter introduced called edit to this template that, when used, will enable to display an  [edit]  link to the value of the parameter?

Example, which would be rendered as shown on right:

This could benefit a lot of users, so they can make their userbox collection into a template, with collapsible categories(see mine), and transclude it where-ever they want, and have easy access to editing the template page itself.

Ofcourse it would be nice if you could also make the external-link icon disappear.

I know that it is apparently already possible to have this functionality, because i just showed you an example with it. My intention is to make it easy to use for people who don't know how to get this kind of special functionality using code in wiki-markup + HTML. &lArr;&uArr; ©TriMoon™ Talk @ 19:07, 16 September 2009 (UTC)

Multiple columns
Is it possible to add an option for multiple columns (user specified #, or limit to 1–4)? –  VisionHolder  «  talk  »  18:16, 20 February 2010 (UTC)
 * I'd second this request. Carter (talk) 19:32, 23 February 2021 (UTC)

Confusing
'''Why does it have to be so confusing? Can It be explained easier?''' —Preceding unsigned comment added by Joseph507357 (talk • contribs) 23:30, 18 August 2010 (UTC)

Template-protected edit request on 20 February 2020
There is an extra semicolon at line 1:  that probably does not affect anything - still sending an edit request so it is recognized. --ネイ (talk) 05:32, 20 February 2020 (UTC)
 * Yes check.svg Done DannyS712 (talk) 05:54, 20 February 2020 (UTC)

Template-protected edit request on 22 May 2020
Please apply Special:Diff/958287469 to add new parameter toptextstyle, which would allow look and feel customization of the header. —⁠andrybak (talk) 23:26, 22 May 2020 (UTC)
 * ✅ – looks like it needs more work, but yes, this looks like a good addition to the template, thank you!  P.I. Ellsworth   ed.  put'r there 01:33, 23 May 2020 (UTC)

Collapsable?
This was raised once back in 2007 but I really think it'd be helpful to have this feature. I'd like to use it for my own userboxes and I don't know how to make one using the extra-css, and I really don't know how templates work but is this possible? Skarmory  (talk •   contribs)  05:21, 9 February 2021 (UTC)
 * , you can create collapsible userbox box using template Userboxside. For more information, see . —⁠andrybak (talk) 09:58, 9 February 2021 (UTC)
 * Thanks! Skarmory   (talk •   contribs)  22:05, 9 February 2021 (UTC)

Template-protected edit request on 9 August 2023
Is it possible to add a parameter for the Userboxes to align in the center? Lightoil (talk) 09:43, 9 August 2023 (UTC)
 * It does not appear possible with the current code. The way that left is implemented appears to prevent it. A workaround is to replace Userboxtop on your user page with a modified version of the basic output of this template:
 * I have placed an example of this code on the template's testcases page. – Jonesey95 (talk) 17:04, 9 August 2023 (UTC)
 * been dabblin' with the sandbox code, and it looks like removing the left margin code and including "margin:auto" is all that's needed. Have added some to your test case. The other test cases still look okay, as well. Maybe it's time to fix this code?  P.I. Ellsworth &thinsp;, ed.  put'er there 17:40, 9 August 2023 (UTC)
 * I like your work. I added a few more testcases, just to test for more valid and invalid cases. It looks pretty good to me, but I do worry that with 56K transclusions, and the lack of scrutiny of User pages, there are going to be some really screwed up edge cases out there that are just barely working now and that get broken by this change. Maybe we implement it and then do a random sample of a few hundred pages to see if anything looks bad. – Jonesey95 (talk) 18:13, 9 August 2023 (UTC)
 * Thank you, it is based on your work. I added float=none on the test cases page. That one might be trouble. We can try this, and then do the sample and the usual, "they holler, we fix" thing. Interesting that "align=middle" also now works to center.  P.I. Ellsworth &thinsp;, ed.  put'er there 18:35, 9 August 2023 (UTC)
 * none is not relevant to this template; float is not a valid parameter, so if it is used, it is ignored and the default right alignment is applied. middle is also you fooling yourself: it is invalid, analogous to foobar, so it is ignored and  determines the placement. Let's try to roll it out and see if anyone screams. If they do, we copy the weird edge case to the testcases page and continue working on it. – Jonesey95 (talk) 19:30, 9 August 2023 (UTC)
 * Thank you very much for your help! Consider it run up the flagpole.  P.I. Ellsworth &thinsp;, ed.  put'er there 20:41, 9 August 2023 (UTC)
 * I checked 50 pages and saw no problems. I don't know how they looked before, but none of them looked terribly broken, and some with complex layouts looked just fine. And, for future readers, what I should have said above is that middle replaces the default value of "right" with "middle", but "float:middle" is not valid, so the "float:" style instruction is ignored, and  determines the positioning of the table (i.e. centered). – Jonesey95 (talk) 01:42, 10 August 2023 (UTC)
 * the center parameter and argument should work for you now. Thank you for your edits, and let me know if you need further help.  P.I. Ellsworth &thinsp;, ed.  put'er there 20:44, 9 August 2023 (UTC)
 * Paine Ellsworth and Jonesey95, thank you all for the help implanting my edit request. Lightoil (talk) 01:23, 10 August 2023 (UTC)
 * Happy to help!  Paine  01:26, 10 August 2023 (UTC)