my orange div, receives a wavy background as the div’s background, but on top, I have another div that has an image, which should be pasted on it, but due to this waviness, it ends up being detached from the div, how can I solve this? I thought about using position: relative, but I don’t know if it’s the best way to solve this
I expected something similar to this
I have that
my wave background
.about-us-section {
background: url("/assets/images/about-us-background.png") repeat-x;
padding: 90px 0px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
<div class="main-section" id="home">
<img
class="person-image"
src="/assets/images/person.png"
alt="Imagem da Home"
/>
</div>
<div class="about-us-section" id="about-us">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Omnis facere
velit repellat eligendi accusantium ratione doloribus, aliquid sapiente
iste fuga ad totam deserunt temporibus commodi, dicta voluptas, at
exercitationem necessitatibus?
</p>
</div>
2
Answers
From what it looks like this your trying to put this at the bottom of your page, if that’s the case it might be easiest to put in your CSS the attribute position and assign it to absolute and then in the attribute bottom to 0px
hope this helps!
Hi,
You can use a simple trick witch is
-margin
. Important note: yours second div should have transparent background to allow first div background to show up.Solution
I don’t have yours
wavy div
, so for this example I used a simple circle gradient background to show the purpose. You should adjust margin height at your own background.Cheers