I'm struggling to vertically center a div containing my logo within the navigation header. I've scoured various topics on stackoverflow, but haven't found a satisfactory solution. Does anyone have a responsive fix for this?
Explored: How to vertically center a div for all browsers?, but it didn't address my problem.
The objective is to have the logo div on the left side centered vertically, while the nav div on the right side also centered vertically.
Code Snippet:
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
font-size: 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, Sans-Serif;
vertical-align: baseline;
outline: none;
}
#header {
background: #00968B;
height: 58px;
}
.logo {
height: 58px;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<div id="header">
<div class="container">
<div class="logo">
logo
</div>
<div class="nav">
</div>
</div>
</div>
</body>
</html>