Hi all this is a simple tic tac toe game board made with css flex .I want to paste "X" in the vertical center of box when its hovered with using flex.This is the link codepen.io/anon/pen/bMOmRq
Asked
Active
Viewed 58 times
2 Answers
0
Add this css to .box
display: flex;
align-items: center;
justify-content: center;

Mohamed Ramrami
- 12,026
- 4
- 33
- 49
0
Use this code for vertical center:
.box:hover::before{
content: "X";
display:flex;
align-items:center;
height:100%;
justify-content: center;
}

Stephen Kennedy
- 20,585
- 22
- 95
- 108

renuka
- 698
- 4
- 8