Home > Back-end >  How to align ag-grid table to the center of the sceen
How to align ag-grid table to the center of the sceen

Time:01-18

I am new to Ag-Grid Angular, I have created the agGrid table and set width: 800px and height: 500px, but the table is aligned in the left side. Can anyone tell me how to center align tables.

CodePudding user response:

Add margin: auto in style attribute of ag-grid-angular.

<ag-grid-angular style="width: 500px; height: 200px; margin: auto;"  [rowData]="rowData" [columnDefs]="columnDefs">
</ag-grid-angular>

  • Related