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
  • 346,931
  • 104
  • 581
  • 701
Maifee Ul Asad
  • 3,992
  • 6
  • 38
  • 86

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,350
  • 15
  • 29