Zebra stripes in database output?

Zebra stripes in database output?

by N Hansen -
Number of replies: 3
Is there a way to get the CSS styling of the database module to do zebra striping of the list of database entries? I don't see how since the template for lists simply just repeats the same thing over and over and wouldn't allow for alternating styling.
Average of ratings: -
In reply to N Hansen

Re: Zebra stripes in database output?

by patrick Frickel -
Hi,

That would be great. I know you can code it in Excel but don't know how you would do it in php.

Are you using the css style sheets to create a particular look and feel....I have got there yet...is it working well...can I use css layout features to create sophisticated layouts I wonder.

Cheers,
Patrick
PS if you find out how to do this...pls post to the forum.
In reply to patrick Frickel

Re: Zebra stripes in database output?

by patrick Frickel -
Ahhh....replying to your own posts!

Quick search of Google and it seems that there is no (as far as I can see) way of alternating the rows with out using DOM and jscript.

CAN WE USE THEM IN PHP?? are will able to reference an external script on the server in a moodle directory I wonder. If we can here is the solution and more:

http://www.alistapart.com/articles/zebratables/

I not, you can manually do the zebra stripping...but I would prefer to watch paint dry

Patrick
In reply to N Hansen

Re: Zebra stripes in database output?

by David Scotson -

I looked into this too and the only way is to use a javascript that identifies the table via a CSS id or classname and adds the appropriate CSS class to the alternating rows.

I've used this before to save time when creating and editing static HTML content and it works quite well.

A List Apart has an article with downloadable source code

edit: Note to self, I really should read the other posts before replying.