WildThing
WildThing

Reputation: 1285

Remove default padding from Ant design table

https://ant.design/components/table/

I am using ant design 4.17 and react v17

screenshot of the class I am trying to modify

This is what I tried but it does not work.

.ant-table-tbody{
  padding: 0;
}
.ant-table-tbody > tr > td{
  padding: 0;
}

Upvotes: 2

Views: 9498

Answers (1)

Alexander Kosykh
Alexander Kosykh

Reputation: 371

You can be found these className in the node_modules folder. node_modules/antd/es. Then, you found the index.css file lists out all of the classNames and attributes that are editable. or you can be use

.ant-table-tbody{
  padding: 0 !important;
}
.ant-table-tbody > tr > td{
  padding: 0 !important;
}

Upvotes: 4

Related Questions