Ik heb deze code.:
<!DOCTYPE html>
<html>
<head>
<title>PHP HTML TABLE DATA SEARCH</title>
<style>
table,tr,th,td
{
border: 0px solid black;
}
</style>
</head>
<body>
<!-- background="backgroundbriefje.png"-->
<form action="totalbriefjes.php" method="post">
<table style="width: 900px;" cellspacing="0" >
<tr bgcolor="#8064A2">
<th style="width: 100%;" align="left"><font color="white">Recipe Nr.: </th>
</tr>
</table>
<table style="width: 900px;" cellspacing="0" >
<tr bgcolor="#8064A2">
<th style="width: 100px;"><font color="white">Specifications</th>
<th style="width: 100px;"><font color="white">Target</th>
<th style="width: 10px;"><font color="white"></th>
<th style="width: 80px;"><font color="white">Min</th>
<th style="width: 5px;"><font color="white"></th>
<th style="width: 80px;"><font color="white">Max</th>
<th style="width: 10px;"><font color="white"></th>
<th style="width: 200px;"><font color="white">Unit</th>
<th style="width: 200px;"><font color="white">Condities</th>
<th style="width: 200px;"><font color="white">Rec.Nummer</th>
<th style="width: 200px;"><font color="white">Aktief</th>
<th style="width: 200px;"><font color="white">Naam</th>
</tr>
<!-- populate table from mysql database -->
<?php while($row = mysqli_fetch_array($search_result)):?>
<tr>
<td align="right"><?php echo $row['Spec'];?></td>
<td align="center"><?php echo $row['Nominal'];?></td>
<td align="right">(</td>
<td align="center"><?php echo $row['low'];?></td>
<td align="center">-</td>
<td align="center"><?php echo $row['High'];?></td>
<td align="left">)</td>
<td align="center"><?php echo $row['Unit'];?></td>
<td align="center"><?php echo $row['Conditions'];?></td>
<td align="center"><?php echo $row['Nr'];?></td>
<td align="center"><?php echo $row['Active'];?></td>
<td align="center"><?php echo $row['Name1'];?></td>
</tr>
<?php endwhile;?>
</table>
</form>
</body>
</html>
Nu wil ik echter dat het zo gaat uitzien als in de foto LINK(image taqs werkt niet)
Nu kan ik die lijnen krijgen door in de style dit te gebruiken.:
tr:nth-child(even) {background: #F2F2F2}
tr:nth-child(odd) {background: #FFFFFF}Echter dan verdwijnt weer die bovenste blauwe balk in mijn code.
Hoe kan ik en die blauwe balk aanhouden en dan overgaan naar die om en om kleuren?