I am trying to format my table to look like the one shown in https://i.sstatic.net/FEPyL.jpg
My goal is to add top and bottom borders to each row (tr) of my table, similar to what is depicted in the image. While I managed to get one border working, the other seems to be a challenge. I read online that setting display block for tr might solve the issue, but doing so causes all my text to align to the left side. For clarity, I used red and blue borders in my code snippet. Can someone guide me on how to achieve this?
table {
background-color: #EEEEEE;
margin-top: 40px;
}
table tr {
/*display: block;*/
border-top: 2px solid red;
border-bottom: 2px solid blue;
}
<!DOCTYPE html>
<html>
<head>
<title></title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
<table class="table table-striped">
<tbody>
<tr>
<td> </td>
<td class="table-title">Matin</td>
<td class="table-title">Apres-midi</td>
</tr>
<tr>
<td>Lundi</td>
<td>08h00-12h00</td>
<td>13h00-17h00</td>
</tr>
<tr>
<td>Mardi</td>
<td>08h00-12h00</td>
<td>13h00-17h00</td>
</tr>
<tr>
<td>Mercredi</td>
<td>08h00-12h00</td>
<td>13h00-17h00</td>
</tr>
<tr>
<td>Jeudi</td>
<td>08h00-12h00</td>
<td>13h00-17h00</td>
</tr>
<tr>
<td>Vendredi</td>
<td>08h00-12h00</td>
<td>13h00-17h00</td>
</tr>
<tr>
<td>Samedi</td>
<td>08h00-12h00</td>
<td>13h00-17h00</td>
</tr>
<tr>
<td>Dimache</td>
<td>Ferme</td>
<td>Ferme</td>
</tr>
</tbody>
</table>
</body>
</html>