When I try to make flex box that has a P tag and a H1 tag the p tag pushed to the bottom of the page I’m interested that the H1 and the text and the p tag will be in the top left corner.
This is my code
Any help in what am I doing wrong will be appreciated.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.flex-rectangle{
display: flex;
flex-direction:column;
/* align-content: flex-start; */
justify-content: center;
text-align: center;
width: 80%;
height:50%;
background: #ca0164;
max-height: 500px;
vertical-align: text-top;
}
.flex-item {
background: blue;
}
.flex-rectangle:before{
content: "";
display: block;
padding-top: 25%;
}
p .flex-rectangle {
color: green;
}
.redtitle {
color: red;
background-color: black;
}
h1.title {color: red;}
</style>
</head>
<body>
<div class="row">
<div class= "flex-rectangle">
<h1 class = "title flex-item">This is my header</h1>
<p class = "flex-item">This my p tag</p>
</div>
</div>
</body>
</html>