In
<!DOCTYPE html>
<html>
<title> 51 Pegasi Studios </title>
<link rel="icon" href="file:///D:/Files/51PEGASI/icon.png">
<head>
<style>
.topnav {
position: sticky;
font-family: 'Roboto', sans-serif;
background-color: black;
overflow: hidden;
margin-left: 0%;
margin-right: 0%;
color: white;
padding-right: 15%;
padding-left: 15%;
width: 50;
height: 50;
}
.topnav a {
transition: text 0.15s ease-in-out;
float: left;
color: #f2f2f2;
padding: 18px 18px;
text-decoration: none;
font-size: 20px;
}
.topnav a:hover {
color: #977DA0;
}
.topnav a.active {
color: white;
}
</style>
</head>
<body>
<div class="topnav">
<a style="text-align:left" href=""><img src="pegasiLeft.png" height="15%" width="15%" alt="51 Pegasi logo"></a>
<a style="float:right;" class="active" href="#home"><b>HOME</b></a>
<a style="float:right;" href="#about"><b>ABOUT</b></a>
<a style="float:right;" href="#gamedesign"><b>GAME DESIGN</b></a>
<a style="float:right;" href="#gamedev"><b>GAME DEV</b></a>
<a style="float:right;" href="#programming"><b>PROGRAMMING</b></a>
<a style="float:right;" href="#music"><b>MUSIC</b></a>
</div>
</body>
</html>
I want the image to be centered vertically, similar to the text buttons, on the same line as them. I've tried messing around with different alignments and such, but to no success. I'm assuming there's a way to go about doing it without having to use a different method than I did with the text.
This is what it looks like in practice.