Struggling to create a web layout using only HTML and CSS. Seeking assistance with the following code:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
section {
min-height: 100vh;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: #fddcc356;
}
.container {
width: 90%;
max-width: 600px;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
}
.img_part {
width: 40%;
height: 250px;
background: url(images/hat.jpg) no-repeat center/cover;
border-radius: 8px;
position: relative;
}
.text_part {
width: 50%;
min-height: 550px;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
padding: 30px;
border-radius: 8px;
color: white;
margin-left: -20px;
}
.text_part h1 {
font-size: 40px;
font-weight: lighter;
}
.text_part p {
margin: 20px 0;
line-height: 25px;
font-weight: 500;
}
.text_part a {
text-decoration: none;
color: black;
padding: 20px 30px;
letter-spacing: 2px;
display: inline-block;
text-transform: uppercase;
background-color: white;
position: absolute;
}
.behind_part {
min-width: 25%;
min-height: 100px;
background-color: brown;
position: absolute;
border: 2px solid red;
margin-right: 350px;
margin-top: -350px;
}
<section>
<div class="container">
<div class="img_part"></div>
<div class="text_part">
<div class="content">
<h1>French girl</h1>
<h1>Summer Outfit</h1>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt.
</p>
<a href="#" class="btn">Learn More</a>
</div>
</div>
<div class="behind_part"></div>
</div>
</section>
My Output : https://i.sstatic.net/N8zcG.png
The actual output: https://i.sstatic.net/KiMKm.png
Issue: Struggling to position the brown container behind the image without covering it. Seeking advice on resolving this problem, despite accomplishing it 90%.