I have searched about this pretty much and still not able to understand the reasong for the behaviour. I have a td element with width attribute specified and I also have specified the width in css class. But the width in css class is reflecting, doesn't the width attribute of element take higher priority?
Sample code:
<table class="sample">
<tr>
<td width="70%" class="cell">First cell</td>
<td class="cell">Second cell</td>
</tr>
</table>
Css
table.sample {
border: 1px solid red;
width: 100%;
}
td.cell {
border: 1px solid black;
width: 40%;
}
I understand that width attribute is deprecated and not advisable to use, I am trying to understand the behavior as I have to fix a similar issue, where I have many pages using the style td.cell but I need to override it in one page, I can go for style attribute that is one way, or define another style class.