@FarisPalayi
Posted
Nice work tackling your first solution 👏
- About centring a container to the middle of the page, first you need to set a
min-height
/height
to the page. For that, you can add100vh
min-height
to the body tag. 100vh means the page will have the same height as the viewport's height. - And then you can use any of these methods to position it in the centre.
I personally like to use the dispaly: grid; place-items: center;
method since it is the shortest. But, you can use any way that you are comfortable with.
And also, there are a lot of other ways you can do this. And that's how CSS is, there'll be a ton of other ways you can do one thing in CSS. And most of the time there's no one right way to do it.
Have fun coding 🎉
Marked as helpful
@yusufdimari
Posted
@FarisPalayi Thank you🙏