I'm trying to place 2 images side to side and have some text in the center of both images, but after adding the first image in CSS
with background :(url)
, I cannot add a second image because it just overrides the first one and I put images directly in a div
, I cannot place text inside them.
As you can see in the below HTML
that if I put one image in HTML
and I through CSS
, I cannot place text over it and if I place it in the CSS
,they just override each other.
HTML
and CSS
#image{
height: 400px;
background-color: black;
background: url("https://www.dizzion.com/wp-content/uploads/2017/06/Working-on-Laptop-x1200-1024x683.jpg");
}
<section id="images">
<h1>affortable shit</h1>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Ex quae nisi aliquid, saepe eaque ad repudiandae hic minus commodi tempore.</p>
<img src="https://media.sproutsocial.com/uploads/2017/02/10x-featured-social-media-image-size.png" alt="">
</section>