hey all, i want to do same thing with links at left frame. http://goo.gl/4XMG9 here is the example. im using php and want to make links diffirent than before it. at the left frame a link is grey and next one is darker grey. thats the main problem for me how can i do it in css and php? thanks for the answers
Alternatively a PHP & CSS solution would be to: Set the default link to be light grey. Within the loop, determine if the counter/index is odd or even using %, i.e. modulus. If it's even, assign a class to the link which sets the colour to dark grey. Just for clarification your CSS could be something like: a{ display: block; background: #ccc; } a.darkGrey{ background: #aaa; } Code (markup): This is a very broad CSS rule so you'd want to limit it more. Also to check for odd/even in PHP: // Loop for example for($i = 0; $i < 10; $i++){ if ($i % 2) print "$i is odd.<br />"; else print "$i is even.<br />"; } Code (markup): Hope that helps you start in the right direction
This could also have been achieved through the use of JS I did something similar in the tables and players pages on http://horsforth.philipbroadhead.org