It was challenging to align the items like the hero text box, call to action, images, buttons in the center of the screen, or a vertical direction.
But now it's really easy with CSS Grids and flexbox.
As you may already know, CSS Grid is the new layout standard for the web.
CSS Grid vertical align is a concept of moving the desired grid children in the Y or vertical direction.
A Quick Image to understand what is vertical and horizontal:
You can see a laptop image, which is a child of CSS Grid container.
To move it in the middle, you can use align-items: center;
Similar to this, you can utilize other values of align-items.
If you want to move in the middle of the screen, you can put justify-content: center; along with align-items: center;
Note: Make sure that your container or parent should have display: grid; property.
CSS Grid vertical align with the shortest way possible
Yes, there is a short form to align the elements in the middle of the screen.
You can utilize place-items: center;
It's a short form for justify-content: center; and align-items: center;
If you are new to CSS Grids, you should check a complete guide by CSS tricks. Their guide is pretty helpful.
Go ahead and read: A Complete Guide to CSS Grids
We did a straight-to-the-point article about CSS justify-content: space-between. You will love it.