Need help with vertical centering of a div

I’m doing a project. I’d like to do it completely by myself. And I’ve met a big problem: how to center vertically a div with class ‘container’… There is a piece of code:

 <div class="block block1">
		<div class="container">
			<p>Form healthy habits to take your fitness to the next level.</p>
			<div class="btn">START NOW</div>
.block {
	text-align: center;
	padding: 5px;
	height: 590px;

.block1 {
	background: url("K:/Проект MOVE/bg1.jpg");
	background-size: cover;
	background-position: 0 -147px;

.container {
	border: 2px solid red;

i can highly recommend this guide:

It should contain what you need

Thanks. I’ll try. If I have questions I’ll write you again )

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.