Reputation: 9996
Is it possible to have spacing among my TR
as the example below
<tr class="foo">
<td>
<div>
<p>
<span class="departureTime">03h00</span>
<span>New-York</span>
</p>
<p class="espacement_important">
<span class="arrivalTime">15h00</span>
<span>Bahamas</span>
</p>
<p class="duration espacement_important"><span >8h00</span>
<span>2 correspond.</span>
<span>A380</span>
</p>
</div>
</td>
<td class="unavailable">indisponible</td>
<td><input type="radio" />
<label >10.00 €</label>
</td>
<td><input type="radio" />
<label >50.00 €</label>
</td>
</tr>
Upvotes: 0
Views: 211
Reputation: 1181
try using border-spacing for table
table {
border-collapse: separate;
border-spacing: 10px 50px;
}
Unfortunately spacing in tables are pretty inflexible from my experience, so you should avoid using tables for layouts (among other reasons)
Upvotes: 3
Reputation: 4686
There are so many ways to achieve this
table {
border: none;
border-collapse: #EEEEEE;
}
tr {
border: solid 1px #5E6977;
display: block;
margin-bottom: 10px;
min-height: 60px;
width: 500px;
padding: 5px;
}
tr.no-border {
border: none;
border-bottom: solid 1px #5E6977;
}
th {
line-height: 60px;
border: none;
width: 160px;
}
td {
border: none;
border-right: solid 1px #5E6977;
width: 160px;
height: 60px;
}
td:last-of-type {
border-right: none;
}
<table width="200" border="1">
<tbody>
<tr class="no-border">
<th>Month</th>
<th>Savings</th>
<th>Savings</th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
Upvotes: 1
Reputation: 149
DIV elements would be more appropriate for a such display. If you really want to use tables, just display what you want in Firefox and use Firebug to check which css styles are applied to the TR elements that interest you.
Upvotes: 1