'align image to center in a dataTable
I have a column in my dataTable:
{
"mData": null,
"mRender": function (data, type, val) {
debugger;
if (!booleanGlobalReportEditor) {
if (!data.scheduled) {
return '<image class="imgBtn" src="/common/images/edit_16.gif" alt="run edit image" onclick="bctrHandleRun(' + data.id + ')"/>';
}
return "";
}
}
}
I need to center the image to the display in the middle of my column. I have tried adding style="vertical-align: middle;" to my img tag. I also tried doing a className: "text-center" but nothing has worked so far.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
