Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: alternating row colors

by Russ (Deacon)
on May 18, 2001 at 01:02 UTC ( #81371=note: print w/replies, xml ) Need Help??


in reply to alternating row colors

I like to use something like this:
my @BGColors = ('#dddddd', '#ffffff'); for (1..10){ # As you loop through a database query result or somethin +g print qq{ <tr bgcolor="$BGColors[$flip = !$flip]"> <td>$_</td> </tr> }; }
Also, see Flipper for more discussion about this kind of thing.

Russ
Brainbench 'Most Valuable Professional' for Perl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://81371]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2022-05-22 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (78 votes). Check out past polls.

    Notices?