When you use 100% it means that you take the whole heigth os the div’s parent. If you want to show your div always in the viewport, try using this units : vh
They mean: viewport height, so if you set the height:100vh
, the div will always be fit to the viewport no matter what screen. 🙂
CLICK HERE to find out more related problems solutions.