I have successfully made table rows with alternating colours using PHP but was wondering if there is a way to make hyperlink colours match the rows. I have tried a few methods using PHP which don't seem to work. Is this possible to do?
One way might be to create two different classes in your css, like: a.blueLink:link { color: #0000FF; } a.blueLink:visited { color: #0000FF; } a.blueLink:hover { color: #0000FF; } a.blueLink:active { color: #0000FF; } a.redLink:link { color: #FF0000; } a.redLink:visited { color: #FF0000; } a.redLink:hover { color: #FF0000; } a.redLink:active { color: #FF0000; } Code (markup): Then in your php when your printing your links add a class to the <a> to set it to the proper color. <a href="http://google.com/" class="blueLink">A blue link</a> <br /> <a href="http://google.com/" class="redLink">A red link</a> Code (markup):