I have a table with the display: flex
property, whose cells will be centered vertically. When there are more cells than the table can show, the overflow:
Please visit - https://jsfiddle.net/3y80zqzc/1/
You will observe newly added class for tbody
. margin parameter is most important which ensures vertically middle position for the content.
margin: auto, 0; /*this is for vertically middle position*/
margin: 0, auto; /*this is for horizontally center position*/
You may also look at the HTML code
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
A
B
C