zebra (even/odd) rows css in <ul> and hyperlink issue

Bukiet

New Member
I have this little select code which should provide a 'zebra' even/odd rows. I don't understand how to change the css for that:1, every other that will be listed (and not every second) should have .even css2, if one of them clicked should be bold as well(I could not figure out, how to merge these two issue)Any help would be appreciated, from a beginner.\[code\]<div id="left"><?php$query = $pdo->prepare('SELECT id, name FROM test1 ORDER BY name ASC');$query->execute();?><ul> <?php foreach ($query as $i => $row) { ?> <li> <?php if ($i)?> <input name="checkbox_add[]" id="test_<?php echo $i ?>" type="checkbox" value="http://stackoverflow.com/questions/7236737/<? echo $row['id']; ?>"/> <label for="test_<?php echo $i ?>"><a href="http://stackoverflow.com/questions/7236737/test1.php?gid=<?php echo $row['id']; ?>"><?php echo $row['name']; ?></a></label> </li> <?php } ?></ul></div>\[/code\]
 
Top