#Divs are stuck under main image

2 messages · Page 1 of 1 (latest)

distant pond
#

Hey, i have a main image like this:

  <div class="content">
        <div class="contentDiv">
            <h1 class="contentText">Japan</h1>
            <p class="contentLine">Lorem Ipsum fugiat mollit duis proident sit aliqua ullamco culpa culpa enim pariatur cupidatat aliquip mollit amet.</p>
        </div>
    </div>
    <div id="secondSection" style=" background-color: white; height: 20em;">
        <img src="./images/kimino.jpg">
    </div>
.content {
    position: absolute;
    top: 6em;
    left: 0px;
    right: 0px;
    bottom: 0px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    object-fit: cover;
    background-size: cover;
    background-repeat: no-repeat;
    background-image: linear-gradient(rgba(0, 0, 0, 0.527),rgba(0, 0, 0, 0.5)), url(./images/home_image.webp);
}

.contentText {
    font-style: normal;
    font-size: 5em;
    color: white;
    margin-bottom: 0px;
    text-transform: uppercase;
}

.contentDiv {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    margin: 0 auto;
    text-align: center;
    max-width: 50%;
    width: fit-content;
    z-index: 100;
    top: 20% !important;
    height: fit-content;
}

.contentLine {
    font-size: 2em;
    padding-top: -1em;
    color: white
}

but now i want another "section" (the one with id "secondSection") after the main image, but its just put under the main image

why is this happening and how can i fix that?

worldly solar