Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant Design: How to make items have equal heights

Tags:

reactjs

antd

I use Ant Design in my react project. When I use the Row, I want all the columns in the Row have the same height.

What happens now:

enter image description here

What I expect:

enter image description here

Do you guys have any idea how to do it?

like image 288
coinhndp Avatar asked Sep 12 '18 12:09

coinhndp


People also ask

How do you center cards in ant design?

You also achieve it using Flexbox ( <Row type="flex"> ), with align-items: center for the row.

What is gutter in ant design?

Grid Gutter. You can use the gutter property of Row as grid spacing, we recommend set it to (16 + 8n) px ( n stands for natural number). You can set it to a object like { xs: 8, sm: 16, md: 24, lg: 32 } for responsive design.

How do you make an ant design table responsive?

Just add a From To column with a custom render function, and set the responsive property on that column to only show on xs screens. The From and To columns will have the responsive property set to show on md and above.

Is ant design mobile responsive?

With a fluid, responsive UI, clean design language, and also visualization support through AntV, Ant Design is surely on the way to grab a huge chunk of the market share when it comes to Industry grade dashboards.


1 Answers

Seems type="flex" is no longer supported. I've just set height="100%" to Col's first child. enter image description here

like image 90
Дмитрий Дорогонов Avatar answered Nov 16 '22 02:11

Дмитрий Дорогонов