@DarkstarXDD
Posted
- Don't set
height: 100%
on thehtml
. You don't need to set or change any values onhtml
. It could break the site in unexpected ways. - By default
<body>
or<div>
elements won't take the full height of the screen. They will only take the height needed to fit their child elements in. So if you want to center your component on the screen you will have to explicitly tell the<body>
or the<div>
(whatever is the parent element of your component) to take the full height of the screen by usingmin-height: 100vh
.vh
means the viewport height.
Marked as helpful
@Ridwan10000
Posted
@DarkstarXDD thanks for your suggestion. I had posted this earlier on discord community and got the same solution there.