In my current HTML setup, I have a section structured like this:
.projhero {
display: flex;
justify-content: center;
align-items: center;
min-height: 100%;
}
.card-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-column-gap: 24px;
max-width: 1200px;
width: 100%;
}
.projcard {
position: relative;
height: 350px;
}
<section class="projects projhero" id="projects">
<h1> Title </h1>
<div class="card-grid">
........
</div>
</section>
However, the issue I'm facing is that the title appears next to the contents of the div (which contains cards in a grid representing books) instead of appearing at the top as desired when entering the section. I want the grid of cards to be displayed underneath the title.
I attempted various CSS techniques found on platforms like YouTube and chatgpt, but unfortunately, none of them provided a solution to my problem.