How to add the align attribute to this line of code (inline) - HTML, JavaScript, and jQuery -
i looking insert align attribute centering column data. have several lines similar in composition this:
tdhtml = tdhtml + "<td style=\"width:42px;\">" + priorityformat($(this).attr("ows_priority_x0020_number")); + "</td>";
is doable?
thanks!
don't use inline css
add class or target td parent selector
example:
tdhtml = tdhtml + "<td class='td-center'>" + priorityformat($(this).attr("ows_priority_x0020_number")); + "</td>";
css
.td-center {width:42px; text-align:center}
Comments
Post a Comment