0

I have a question regarding vertical aligning a logo in a navbar, which I gave a height of 90px, however I am not able to align it vertically in the middle. I have read through previous question and tried some provides answers but didn't work. I am really wondering why vertical aligning is always such a hard task.

This is my code.

<style>
    nav{
        height: 90px;
    }
    img#logo{
        height: 60px;
    }
         
</style>
</head>
<body>
    <nav>
        <div class="nav-wrapper">
          <a href="#" class="brand-logo"><img class="responsive-img" id="logo" src="logos/logo-green.png"/></a>
          <ul id="nav-mobile" class="right">
            <li><a href="sass.html">link A</a></li>
            <li><a href="badges.html">Link B</a></li>
            <li><a href="collapsible.html">Link C</a></li>
            <li><a href="collapsible.html">Link D</a></li>
          </ul>

        </div>
      </nav>
</body>
easyrlj
  • 99
  • 3
  • 8

1 Answers1

0

Just give the logo some padding top of about 30px