Jak zrobić aby div był raz biały a raz czarny (tło):
<?php <div style="background:#000">1</div> <div style="background:#FFF">2</div> <div style="background:#000">3</div> <div style="background:#FFF">4</div> ?>
itd.
?
.odd { background-color: #def; }
table tr:nth-child(even) { background-color: red; } table tr:nth-child(odd) { background-color: blue; }