Vega and Sushanth have answered this question in the comments above. I used
"<td style=\"width:42px;text-align:center \">"
Frage
I am looking to insert the align attribute for centering column data. I have several lines that are similar in composition to this:
tdHtml = tdHtml + "<td style=\"width:42px;\">" + PriorityFormat($(this).attr("ows_Priority_x0020_Number")); + "</td>";
Is this doable?
Thanks!
Lösung 2
Vega and Sushanth have answered this question in the comments above. I used
"<td style=\"width:42px;text-align:center \">"
Andere Tipps
Don't use inline css
add class or target td by 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}