Hello there.
Thats my first post in the forum, so pleas be kind if I post this in the wrong place or something like that
While doing the CSS-cat-thing I asked myself a question, I cant find. a solution to. It’s about centering things in Css.
In step 18 I had to center the cat head, using:
.cat-head {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
Two steps before that I asked myself the question how I could center the cat head and played around a bit. My solution was:
main {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
Both solutions do work, but what could be the reasoning behind going either way in future projects?