Using jquery can td width be overwritten as shown
<table>
<tr>
<td width="30%"></td>
<td width="70%" id="description"></td>
</tr>
</table>
<script>
$("#description").css({"width":"30%"})
</script>
Put all your jQUery code inside document ready event.
$(function(){
$("#description").removeAttr("width").css({"width":"30%"});
});
width should be set inside style and not as an attribute. First remove the attribute and then set the style. If you can use a class then it will be the best approach.
.elwidth
{
width: 30%;
}
$(function(){
$("#description").removeAttr("width").addClass("elwidth");
});
Short answer: yes.
<table>
<tr>
<td id="firstCell" width="30%">...</td>
<td id="secondCell" width="70%">...</td>
</tr>
</table>
<script>
$("#firstCell").attr("width", "40%");
$("#secondCell").attr("width", "60%");
</script>
Although you shouldn't be using width attributes, rather use CSS properties to set the widths of table cells.
<tr>) and you don't have an id set on the table cell for the jQuery code to work.