Predefinição Discussão:Expandir seção

message: :   
Nota: alguns editores da Wikipedia em inglês tentam ajudar com uma pergunta sobre esta predefinição. Por favor, desculpe o fato de que esta discussão é realizada em inglês. Alguns dos exemplos nas seções colapsadas não são exibidos corretamente aqui porque se referem a predefinições no en-wiki.	Note: some editors from English Wikipedia are trying to help out with a question about this template. Please excuse the fact that this discussion is held in English.  Some of the examples in the collapsed sections do not display correctly here because they refer to templates on en-wiki.
== How do I remove the left margin? ==
I want to remove the left margin in the Porutugese Wikipedia version of this template. In the source code, what makes the template touch the left border of the page? Thanks. --Bageense(disc.) 19:12, 5 August 2021 (UTC)
:User:Bageense: How do you want it? The same as it looks now, but in the middle of the page? Or larger like most other amboxes? If neither, please let me know exactly how you want it to look, and I'll try to write the required changes for you. In the below example, "style = margin: auto;" is what controls the horizontal alignment of the box.
Code
Appearance
(This only requires adding the template to a page and passing the parameter . However, because there is so little text, it looks strange.)
Code
Appearance
::Also, if you want the box to be centred but small, I would recommend making the width of the box fit the textdoing so is an idea that I have had for all small left-aligned amboxes, and I am currently trying to get consensus for that change. Regards, DesertPipeline (talk) 16:15, 18 October 2021 (UTC)
::: Hello! What I want is neither of those options. I want to keep the small size, but remove the left margin altogether.
:::
:::style = margin: auto is responsible for the margin? How do we make it null? I tried "0" and "null" instead of auto and it didn't work. --Bageense(disc.) 04:34, 19 October 2021 (UTC)
::::margin:none and margin:null are not valid declarations. For the margin property, valid values are a length; a percentage; or certain keywords - auto or inherit. none and null are not among them. Some browsers may interpret margin:none as equivalent to margin:0 but it should not be relied upon. --Redrose64 🌹 (talk) 08:21, 19 October 2021 (UTC)
::::User:Bageense: I'm not sure what you mean exactly; sorry. "Remov[ing] the left margin altogether", if I'm understanding correctly, isn't possible because with this type of code "margin" means "how far away from the edge a page element is". So with margin-left: 0; the element touches the left side of the page (usuallyI'm simplifying here, because there are other pieces of code that might affect how this works). If you can explain what you mean by margin in this context, hopefully I'll be able to help. Sorry again for my confusion. Regards, DesertPipeline (talk) 15:23, 19 October 2021 (UTC)
::::: So with margin-left: 0; the element touches the left side of the page. Yes! That's precisely what I want. See the template again: it is touching the left side. In the corresponding template I created in the Portuguese wikipedia (link), it has that default space every normal-sized template has. Perhaps a percentage would work, like  said. --Bageense(disc.) 17:01, 19 October 2021 (UTC)
::::::User:Bageense: I understand what you mean now. Add | small = left to the template in the same way this one has itor whatever the Portuguese equivalent of that is. Regards, DesertPipeline (talk) 18:30, 19 October 2021 (UTC)
::::::User:Bageense: Is the problem resolved now? DesertPipeline (talk) 16:13, 25 October 2021 (UTC)
 Oh, hi! Before starting this discussion, I think I already tried adding the small parameter in the pt.wiki template. I didn't work, but anyway, the cause of the problem is there, not here. To be honest, I don't remember why I decided to start the discussion here and not there. Because it seems clear that the problem is actually there... --Bageense(disc.) 16:28, 25 October 2021 (UTC)
:User:Bageense: I see. I hope that you can get the problem resolved. One possible cause could be that they don't have the CSS code on that Wikipedia for small left-aligned message boxes; if it's not that, then I'm not sure what it could be. Regards, DesertPipeline (talk) 16:32, 25 October 2021 (UTC)
::  they do. I've been fiddling with this on pt-wiki in my common.css, to see if I could help, and independently noticed mbox-small-left as well. Defaults for these classes are:
::* .mbox-small{clear:right;float:right;margin:4px 0 4px 1em;box-sizing:border-box;width:238px;font-size:88%;line-height:1.25em}
::* .mbox-small-left{margin:4px 1em 4px 0;box-sizing:border-box;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}
:: Tried tweaking it before I saw your comment (as well as trying some other approaches afterward) and then again just now after you mentioned it, but so far no joy. The rendered table containing the Expand section box has classes "plainlinks metadata ambox mbox-small-left ambox-content" (see prettified excerpt in my pt sandbox) and I've been fiddling with those in my pt-wiki common.css. I can style the text inside by modifying the table cell containing the text, by adjusting the td class mbox-text-span in my css, but that doesn't touch the container. Fiddling with the table classes hasn't worked so far, and I've gone as far as I can afford at this point. This ought to be resolvable in common.css—we just haven't hit the right class or selector combo yet. Maybe you can figure something out from here. The Expand template is here: :pt:Predefinição:Expandir seção. Cheers, Mathglot (talk) 19:52, 25 October 2021 (UTC)
::: Actually, this entire discussion doesn't belong here, and should be moved to pt-wiki; , if you have no objection, I'll move it and leave a pointer to it. Mathglot (talk) 20:01, 25 October 2021 (UTC)
::::I have no objection. Honestly, I don't remember what I was thinking when I started the discussion here. I must have had a reason. By the way, thanks for your effort in helping me, Desert. --Bageense(disc.) 23:13, 25 October 2021 (UTC)
:: @DesertPipeline, one other thing: I did add the |small = left to the pt template sandbox. I seem to remember, though, that I had an issue with 'small' in some other template (here at en-wiki) before, and tracked down the surprising result that |small=no had precisely the same effect as |small=yes (or any other param value); in fact, it was only checking whether the param was present and had a value, but I think that happened somewhere up the line. Not sure if that's equally true in this case. You can see the module defaults around l. 41-43 of the module config, and it's tested in :en:Module:Message_box at l. 168-172; the small box class is added at l. 187. Not quite sure how it all interacts with the |small= setting, but it's in there somewhere. Mathglot (talk) 22:26, 25 October 2021 (UTC)redacted by Mathglot (discussão) 00h29min de 26 de outubro de 2021 (UTC)
thread_title:  Como eu removo a margem esquerda?