My os is: Debian Jessie in Docker
weasyprint==0.34
python==3.6.0
I can override background color, width, heigh, but I can not override the table style
How can I do it?
<style>
table {
border-collapse: collapse;
color: #333;
margin: auto;
}
tr:nth-child(odd) {
background: #eee;
}
tr:first-child {
background: white;
}
td, th {
border: 1px solid #ccc;
padding: 0.5em;
}
th {
border: none;
text-align: center;
}
</style>
<table>
<tr>
<th>dog</th>
<th>cat</th>
<th>horse</th>
<th>iguana</th>
</tr>
<tr>
<td>dog</td>
<td>cat</td>
<td>horse</td>
<td>iguana</td>
</tr>
<tr>
<td>dog 2</td>
<td>cat 2</td>
<td>horse 2</td>
<td>iguana 2</td>
</tr>
<tr>
<td>dog 3</td>
<td>cat 3</td>
<td>horse 3</td>
<td>iguana 3</td>
</tr>
<tr>
<td>dog 4</td>
<td>cat 4</td>
<td>horse 4</td>
<td>iguana 4</td>
</tr>
</table>

Let me confirm your answer tomorrow. Thailand time is neary finish now
Thank you very much. It done
Was there a change? Because with WeasyPrint version 0.40 it seems not to work. See https://stackoverflow.com/q/46346852/562769
Most helpful comment