Why can’t customize the border width?
-
Here is my customized css file in wp4.7.
.mytable {
border-collapse: collapse;
}.mytable td {
border: 4px solid #999;
padding: 0.5rem;
text-align: left;
width:60px;
}
Here is the html content .
<table class=”mytable”>
<tbody>
<tr>
<td>name</td>
<td>number</td>
<td>time</td>
</tr>
<tr>
<td>tom</td>
<td>10</td>
<td>9</td>
</tr>
<tr>
<td>marry</td>
<td>8</td>
<td>5</td>
</tr>
</tbody>
</table>I found that it does no matter which value the width in “.mytable td” is.
For example,the same effect for css format1 and css format2 in customized css file.css format1
.mytable {
border-collapse: collapse;
}.mytable td {
border: 4px solid #999;
padding: 0.5rem;
text-align: left;
width:60px;
}css format2
.mytable {
border-collapse: collapse;
}.mytable td {
border: 4px solid #999;
padding: 0.5rem;
text-align: left;
width:100px;
}The content has same effect after publishing it.
It does no matter which value the width in “.mytable td” is.Which factor result in it?how to fix it?
The topic ‘Why can’t customize the border width?’ is closed to new replies.