Template talk:Div col

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Div col/doc)

From Wikipedia talk:Vector 2022[edit]

Please look at this discussion. Patafisik (WMF) (talk) 16:05, 3 February 2023 (UTC)[reply]

Odd bug in 5-column layout[edit]

Five columns w/ 12 elements renders with 2/3/3/3/1 elements in each column. At narrower and wider widths (4 and 6) it renders properly. – SJ + 18:21, 3 March 2023 (UTC)[reply]

The bug, at colwidth=10em and 5 columns
The bug, at colwidth=10em and 5 columns
Your header says 5, but the text says four. It's working fine for me (expand or contract your window to get four columns; I get four columns of three items at my default screen width). If I zoom my window, it jumps from 4 columns to 6 columns (of two items each), skipping 5 columns entirely. Please link to a page where this is happening, and let us know what skin you are using (in Preferences - Appearance) and what web browser. – Jonesey95 (talk) 19:09, 3 March 2023 (UTC)[reply]
@Sj: Regardless of the number of columns, the number of items per column is browser dependent and outside our control. Indeed, there is nothing in the CSS Multi-column Layout Module Level 1 specification to indicate where such control may be specified. Even when the total number of items divides exactly by the number of columns, you cannot be certain that each column will have the same number of items - if one item is longer than the column width, forcing a wrap, this may cause that column to be slightly longer, or it may cause one item to be pushed into an adjacent column. So twelve items in a five-column layout may be split 2/3/3/3/1, or 3/3/2/2/2, or 2/3/2/3/2 (etc.). We just don't know. --Redrose64 🌹 (talk) 23:32, 3 March 2023 (UTC)[reply]
Thanks for all the detail, both of you. See if you get the same effect on the source page: d:Wikidata:WikiProject_source_reliability#Wikipedia_Perennial_Lists
(Perhaps one of those lines is secretly very long? You can see they all look like two-letter codes. I haven't seen it in any other configurations.) – SJ + 00:15, 4 March 2023 (UTC)[reply]
Over on that Wikidata page, using Vector 2010 and Firefox for Mac OS, as I expand my page, I get 6/6, 4/4/4, 3/3/3/3, 2/3/3/3/1, 3/3/3/3 again, 2/3/3/3/1, and then 2/2/2/2/2/2. Going from four columns to five, then back to four again, as I make the window a little wider is completely baffling to me. – Jonesey95 (talk) 05:50, 4 March 2023 (UTC)[reply]
Like I said, five into twelve won't go - it's 2 remainder 2, and we cannot predict where those odd two will end up, nor whether items are moved from the top of one column to the bottom of the previous, or vice versa. Without carefully examining the browser's source code in order to analyse its algorithm, all we can say is that if all the items are the same length, the browser won't try to put more than three items into any one column.
By means of the break properties (see CSS Fragmentation Module Level 3) it is possible to instruct the browser to keep two items together in the same column, or to force a column break between two particular items or even inside an item that is known to be very long. But this is only useful if the number of columns is fixed - when a column width is specified and the user's display characteristics are unknown (as here) you don't know how many columns there will be, and definitely shouldn't attempt to manipulate column breaks artificially. --Redrose64 🌹 (talk) 12:09, 4 March 2023 (UTC)[reply]

plainlist fails[edit]

Template:Div col#TemplateData gives plainlist as an example class but it has no effect after plainlist was removed from MediaWiki:Common.css in [1]. I think plainlist should work in |class= or possibly a separate parameter like |plainlist=yes. I used {{div col}}{{plainlist}}...{{endplainlist}}{{div col end}} in an article [2] but that's ugly and hard to figure out. PrimeHunter (talk) 15:30, 29 March 2023 (UTC)[reply]

I know much less than I should about CSS, but I think I may have fixed it. I then made this edit to the article in question, and it appears to have preserved the formatting. YMMV, since I am a whacker when it comes to CSS. – Jonesey95 (talk) 18:15, 29 March 2023 (UTC)[reply]
If you're going to wrap things, you should wrap them the opposite way so that the columns CSS is correctly applied.
But yes, that is the appropriate way to do things going forward. Izno (talk) 18:23, 7 November 2023 (UTC)[reply]
Just wondering though, would it be better to add <templatestyles src="Plainlist/styles.css"/> to Template:Div col rather than adding the css to Template:Div col/styles.css? -- WOSlinker (talk) 21:41, 7 November 2023 (UTC)[reply]
Neither. If you want a div col to have a plain list, wrap the div col with plainlist. Izno (talk) 21:53, 7 November 2023 (UTC)[reply]

Template-protected edit request on 19 May 2024[edit]

Under the Notable Persons area, the information for Bruce Bochy should be updated. He was, in past years, the MLB manager for the San Diego Padres and the San Francisco Giants. He is the current manager for the Texas Rangers. Davidjamesfraga (talk) 01:58, 19 May 2024 (UTC)[reply]

@Davidjamesfraga:  Not done: this is the talk page for discussing improvements to the template {{Div col}}. Please make your request at the talk page for the article concerned. When doing so, please provide reliable sources that support the change you want to be made. --Redrose64 🌹 (talk) 06:39, 19 May 2024 (UTC)[reply]