Beginner here. For some reason in the website I'm coding, the to-be buttons don't align horizontally on the nav bar. I'm using flexbox, but even then it doesn't align them like how I want it to. There doesn't seem to be any problems in the code, either.
.topPart {
position: fixed;
overflow: hidden;
top: 0;
margin: 0px 15px 30px 15px;
width: 1790
padding: 30px;
border: 2px solid #3cc851;
background-color: #1f1f1f;
}
.topButtons {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
align-items: flex-center;
height: 15px;
width: auto;
padding: 15px;
background-color: #fff;
color: #1f1f1f;
}
.topButtons .rightButtons {
text-align: right;
margin: auto 2px auto 1500px;
}
.topButtons .leftButtons {
text-align: left;
margin: auto 2% auto 2%;
}
<div class="topPart">
<h2> Website name I don't want to share </h2> <p> Website slogan I don't want to share </p>
<!-- later, make it so that the boxes of text are lined up like how it looks in the code using css -->
<div class="topButtons">
<div class="leftButtons">
<a href="index.html" class="home">home<a>
<a href="" class="mssg">mssg board<a>
<a href="database.html" class="data">database<a>
<a href="roleplay.html" class="rp">rp<a>
</div>
<div class="rightButtons">
<a href="" class="dms">dms</a>
<a class="out">logout</a>
<a class="acc">acc</a>
</div>
</div>
</div>
The right buttons appear to be ~5px lower than the left ones. I'm at a complete loss here, there doesn't seem to be any errors in my code to cause this. Flexbox tags that should fix it don't do anything either, such as flex-direction: row;
and justify-content
.