Wikipedia:Reference desk/Archives/Miscellaneous/2021 February 12
Appearance
Miscellaneous desk | ||
---|---|---|
< February 11 | << Jan | February | Mar >> | February 13 > |
Welcome to the Wikipedia Miscellaneous Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
February 12
[edit]Help with coloring a specific Wikipedia table that I have just made
[edit]Is there any easy way to put all of the information for Democratic US Presidents on this table in blue?:
Thank you. Futurist110 (talk) 01:16, 12 February 2021 (UTC)
- That's annoying. Help:Table#Color; scope of parameters shows a
style=
modifier on the|-
line as setting the color for the whole row, but when I try doing that on the presidents table, it only seems to affect the first cell, and I can't see what's different. --142.112.149.107 (talk) 05:45, 12 February 2021 (UTC)
- Setting the style for a whole row only works if the cells of that row are all on one line in the wiki source. You can do something like:
|- style="background:#ffc;font-weight:bold;" align=center
| align=left | John Doe || [[White Patriot Party (2024)|White Patriots]]<sup>†</sup> || 2025–2073 || 3.2% || 92.1% || +88.9%
- This gives a row of cells with the same background colour:
President's name President's political party President's term in office Unemployment rate at
start of termUnemployment rate at
end of termChange in unemployment rate Abraham Lincoln Republican 1809–1865 12.0% 12.0% 0.0% John Doe White Patriots 2025–2073† 3.2% 92.1% +88.9%
- --Lambiam 08:09, 12 February 2021 (UTC)
- Thanks! How's this, then? --142.112.149.107 (talk) 22:19, 12 February 2021 (UTC)
- Interesting; thank you! I might write on your talk page if I will have any additional questions about this, @Lambiam:! Futurist110 (talk) 01:59, 13 February 2021 (UTC)
- I am not particularly knowledgeable about table markup. I found this out the hard way, by a combination of trying and of looking at the wikisource of tables with a column style. --Lambiam 08:33, 13 February 2021 (UTC)
- Interesting; thank you! I might write on your talk page if I will have any additional questions about this, @Lambiam:! Futurist110 (talk) 01:59, 13 February 2021 (UTC)
- Thanks! How's this, then? --142.112.149.107 (talk) 22:19, 12 February 2021 (UTC)