0

I'm trying to align a property in css with :

display: flex;
justify-content: center;
align-items: center;

body has height :100%, and the described element is the first nested element in body, why it isn't receiving 100% height ?

codesandbox.io

Michael Benjamin
  • 307,417
  • 93
  • 525
  • 644
Maifee Ul Asad
  • 2,815
  • 3
  • 25
  • 65

1 Answers1

1

Kindly add height: 100%; to the id root as you are working with react.

#root {
  height: 100%;
}

enter image description here

VnoitKumar
  • 1,261
  • 14
  • 27