I always get height: 0 on the body, Why this happens?
Either I use height, min-height, etc.
Just use:
body{
height:100vh;
}
This will force the body to 100% viewport height regardless of the page contents.
min-height: 100vh
instead. –
Alroy Height = 0 because the parent of the elements have 0 height, so make sure your parent, which is body here have 100% height or else.
body {
height: 100%
}
This is caused because of parent height is 0. Follow these styles up!
html{
height: -webkit-fill-available;
}
body{
height: 100%;
}
© 2022 - 2024 — McMap. All rights reserved.