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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -