I'm struggling to align my login and sign-up buttons on the right side of the screen. I attempted to adjust their left padding but encountered inconsistencies in their positioning when the screen size changes. I also tried using float: right, but it didn't move them completely to the desired location.
For reference, here is my HTML code: https://pastebin.com/7kAS3Ln5
and here is my CSS code: https://pastebin.com/ffDLJd7j
.header {
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
width: 100%;
height: 70px;
padding: 0 20px;
background-color: white;
top: 0;
left: 0;
}
(topnav styling rules)
(login and sign up button styles)
/* The header section of the website */
<header>
<!-- Top navigation bar -->
<div class="topnav" id="myTopnav">
<img src="fb-helmet.png" alt="Logo" class="helmet-logo">
<div id="teams-btn">
<button class="nav-btn"><a href="#Teams">Teams</a></button>
</div>
(dropdown menu for seasons)
<div id="login-btn">
<button class="nav-btn"><a href="#Login">Log In</a></button>
</div>
<div id="signUp-btn">
<button class="nav-btn"><a href="#signup">Sign Up</a></button>
</div>
</div>
</header>