Difference between revisions of "MediaWiki talk:Common.css"
From Dungeons and Dragons Wiki
(Created page with "==Striped Lists== I would like the ability to do a striped list. Please add the following to the Common.css: <pre> →=======Striped list======: .zebra { list-style: none; p...") |
Realgenius (talk | contribs) |
||
Line 20: | Line 20: | ||
</pre> | </pre> | ||
You would need to change the values of #ffffff to match the pink background of the wiki and and #ddddee; to match a light shading in the wiki style. To access it, you would enter the following before the first line item ... <nowiki><ul class="zebra"></nowiki> --[[User:Rlyehable|Rlyehable]] ([[User talk:Rlyehable|talk]]) 07:17, 8 February 2017 (MST) | You would need to change the values of #ffffff to match the pink background of the wiki and and #ddddee; to match a light shading in the wiki style. To access it, you would enter the following before the first line item ... <nowiki><ul class="zebra"></nowiki> --[[User:Rlyehable|Rlyehable]] ([[User talk:Rlyehable|talk]]) 07:17, 8 February 2017 (MST) | ||
+ | |||
+ | |||
+ | <ul class="zebra"> | ||
+ | <li>Thing one</li> | ||
+ | <li>Thing two</li> | ||
+ | <li>Thing three</li> | ||
+ | <li>How many things?</li> | ||
+ | <li>so many!</li> | ||
+ | </ul> | ||
+ | |||
+ | |||
+ | So every third line is highlighted? | ||
+ | --[[User:Realgenius|Realgenius]] ([[User talk:Realgenius|talk]]) 05:55, 13 February 2017 (CST) |
Revision as of 11:55, 13 February 2017
Striped Lists
I would like the ability to do a striped list. Please add the following to the Common.css:
/* =======Striped list====== */ .zebra { list-style: none; padding: 0; margin: 0; color: #000; } .zebra li:nth-child(3n+1) { text-align: left; background:#ffffff; !important; } .zebra li:nth-child(3n+2) { text-align: left; background:#ffffff; !important; } .zebra li:nth-child(3n+3) { text-align: left; background:#ddddee; !important; }
You would need to change the values of #ffffff to match the pink background of the wiki and and #ddddee; to match a light shading in the wiki style. To access it, you would enter the following before the first line item ... <ul class="zebra"> --Rlyehable (talk) 07:17, 8 February 2017 (MST)
- Thing one
- Thing two
- Thing three
- How many things?
- so many!
So every third line is highlighted?
--Realgenius (talk) 05:55, 13 February 2017 (CST)