I'm trying to alternate row colors but instead only the bullet points are alternating colors at http://althedge.xyz Can someone show me how to do this? Thanks
I'm using this css code below to alternate the bullet point color but how to alternate the row color.
ul:nth-of-type(odd) {
color: #ccc;
}
Php file
<?php
// Database Settings
define('DB_HOST', 'localhost');
define('DB_PORT', '*****');
define('DB_USER', '*****');
define('DB_PASS', '*****');
define('DB_NAME', '*****');
// Connection to Database
$database = new MySQLi(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT);
$sql = 'SELECT * '
. ' FROM crypto ORDER BY Date DESC, Number DESC';
$resultSet = $database->query($sql);
$currentDate = false;
while ($row = $resultSet->fetch_assoc()) {
if ($row['Date'] != $currentDate) {
echo $row['Date'] ;
$currentDate = $row['Date'];
}
echo '<ul><li>' .
'<A HREF="'.
$row["Link"].
'"style="text-decoration: none;"'.
'">'.
$row["Article"].
'</A>'.
'</li></ul>';
}
$html .= '</table>';
echo $html;
?>