Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
How to create tables with alternate row colors
Avatar
rburn99 #1
Member since Mar 2017 · 27 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to create tables with alternate row colors
As the title suggests, can dokuwiki be configured to alternate row colors in tables as in something like tr:nth-child in a css? If so, can you provide syntax and location?
Thanks,
Rob

example screencapture jpg attached
The author has attached one file to this post:
TableAlternatingColors.jpg 52.7 kBytes
You have no permission to open this file.
Avatar
SFITCS #2
User title: Scott Ferguson
Member since Dec 2014 · 455 posts · Location: Canberra, Australia
Group memberships: Members
Show profile · Link to this post
Yes.
Exactly like
tr:nth-child in a css
Just use CSS in conf/userstyle.css. If you don't want to apply the same styling to every table in your DokuWiki, use the Wrap plugin on the tables you do want to uniquely style.

Example:-
cat conf/userstyle.css
tr:nth-child(odd) {
    background: #ccc;
}
Which will only affect screen mode...
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2017-10-24, 00:40:47 (UTC +02:00)