I am a beginner in the world of CSS and have been working on a practice project. However, I am struggling to achieve what the title suggests.
I attempted using the margin-right: auto method that I've learned from various tutorials, but it only ends up centering the title.
Below is a snippet of the code I am working with:
.logo {
cursor: pointer;
margin-right: auto;
margin-left: 1.5rem;
height: 3rem;
width: auto;
}
.title {
text-transform: capitalize;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 1.8rem;
font-weight: bold;
margin-right: auto;
}
header {
position: fixed;
z-index: 100;
width: 100%;
height: 4rem;
display: flex;
justify-content: flex-end;
align-items: center;
}
.nav_links {
list-style: none;
}
.nav_links li {
display: inline-block;
padding: 0 1.5rem 0 1rem;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 1.2rem;
}
<header>
<img class="logo" src="./Images/ic-logo.svg" alt="logo">
<div class="title">
<span class="title1">COLMAR</span>
<span class="title2">ACADEMY</span>
</div>
<nav>
<ul class="nav_links">
<li><a href="#">On Campus</a></li>
<li><a href="#">Online</a></li>
<li><a href="#">For companies</a></li>
<li><a href="#">Sign in</a></li>
</ul>
</nav>
</header>
I am aiming to relocate the title beside the logo while maintaining the navigation bar links aligned to the right side.
Your assistance or guidance on this matter would be greatly appreciated.