I am currently having issues laying out my pictures like the example photo is shown. No matter what I do, my pictures always either grow too big or won't stay in the same place as I need them to be. I wrote and erased so much code at this point that I decided to ask for help!
Note: My CSS code background-image: url()
was given to me by the company, so I do apologize for the weird name for the image. If you need anything else from me, please let me know!
/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@900&display=swap');
/* Global */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Montserrat', sans-serif;;
}
/* Banner Section */
.banner {
width: 100vw;
min-height: 55vh;
background: url(./images/HERO\ 1.jpg) no-repeat;
display: flex;
align-items: center;
justify-content: center;
background-size: cover;
background-position: bottom;
}
.content {
width: 90%;
text-align: center;
}
.content .title {
color: #de041c;
font-size: 65px;
font-weight: 800;
letter-spacing: 2.2px;
text-transform: uppercase;
margin-bottom: -20px;
}
.content .subTitle {
color: #fff;
font-size: 42px;
font-weight: 600;
text-transform: uppercase;
}
.content .sentence {
color: #fff;
font-size: 16px;
margin: 30px 0 0 0;
}
.section-2 {
border-top: 50px solid #de041c;
}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Assessment</title>
<!-- CSS -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="banner">
<div class="content">
<div class="title">Lorem Ipsum</div>
<div class="subTitle">Dolar sit amet aran</div>
<div class="sentence">Rerum quas delectus non ab eveniet nihil, eaque tempora incidunt blanditiis, molestias
sit,
unde id? Tempora eius illo labore officiis quis quae.</div>
</div>
</div>
<!-- Section 2 -->
<div class="section-2">
<section>
<div>
<img src="./images/COLLAGE_IMAGE_1.jpg" alt="Image #1">
</div>
<div>
<img src="./images/COLLAGE_IMAGE_5.jpg" alt="Image #2">
<img src="./images/COLLAGE_IMAGE_4.jpg" alt="Image #3">
</div>
</section>
</div>
</body>
</html>