I have been attempting to align the image in section-1 to the right side, but for some reason, it's not cooperating. I initially tried using flex-box, but I want the image to remain fixed on the right side of the screen without any movement. Floats caused disruptions in the section below, so I turned to grid. Even after setting the display grid and defining the columns, it still doesn't seem to work.
.navbar {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
height: 50px;
background-color: white;
display: flex;
line-height: 50px;
}
.navbar .container {
align-items: center;
display: flex;
}
.navbar-list {
display: flex;
margin: auto;
}
.navbar-list ul li {
align-items: center;
margin-left: 20px;
}
.navbar-list li a {
margin-left: 20px;
color: var(--pureblack);
}
/*section 1*/
.section-1 {
display: grid;
grid-template-columns: auto 400px;
}
.mockups {
height: 400px;
}
html {
scroll-behavior: smooth;
}
html,
body {
overflow-x: hidden;
}
body {
font-family: "Source Sans Pro", sans-serif;
font-weight: 400;
font-size: 0.875rem;
line-height: 1.6;
letter-spacing: 0;
color: var(--font-color-base);
margin: 0;
padding: 0;
}
ul {
margin: 0;
padding: 0;
list-style: none;
}
<nav id="topNav" class="navbar nav">
<div class="container flex">
<img src="/easybank-landing-page-master/images/logo.svg" alt="company logo" />
<ul class="navbar-list">
<li>
<a href="">Home</a>
</li>
<li>
<a href="">About</a>
</li>
<li>
<a href="">Contact</a>
</li>
<li>
<a href="">Blog</a>
</li>
<li>
<a href="">Careers</a>
</li>
</ul>
<button class="btn btn-green">Request invite</button>
</div>
</nav>
<section class="section-1 container">
<div class="container">
<div class="left">
<h3>Next generation digital banking</h3>
<p>
Take your financial life online. Your Easybank account will be a one-stop-shop for spending, saving, budgeting, investing, and much more.
</p>
<button class="btn btn-green">Request Invite</button>
</div>
<div class="right">
<img src="/easybank-landing-page-master/images/image-mockups.png" alt="mockups" class="mockups" />
</div>
</div>
</section>