In the process of developing a react app, I encountered an issue with a sticky top navbar from Bootstrap. After setting the body to height: 100%
, the navbar no longer sticks as intended. I cannot use vh for one of my pages due to mobile content display issues, so I prefer sticking to percentages. Is there any alternative solution for maintaining the sticky behavior while keeping the body height at 100%? Below is the code snippet where I set the body height.
html,
body,
#root {
height: 100%;
max-height: 100%;
}