Answer the question
In order to leave comments, you need to log in
How to correctly position the logo, navigation and button in a horizontal menu?
I am making a horizontal menu with three elements (logo, menu elements and a button). Can't get them to line up. They are stacked on top of each other, even though I'm using display: inline-block.
Please tell me what I'm doing wrong.
Menu link here .
Here is the code:
.nav-container {
display: inline-block;
z-index: 10;
}
.logo {
display: inline-block;
vertical-align: top;
width: 173px;
height: 51px;
margin-top: 4px;
}
.menu {
padding: 0;
margin: 0;
list-style: none;
}
.menu li {
display: inline-block;
margin-right: 25px;
}
.btn-nav {
display: inline-block;
border: 1px solid;
width: 160px;
height: 45px;
background-color: red;
border-radius: 5px;
vertical-align: top;
text-align: center;
font-size: 0.9em;
color: #ffffff;
padding-top: 12px;
box-shadow: ;
}
Answer the question
In order to leave comments, you need to log in
https://codepen.io/topicstarter/pen/yGzRpB something like this, see
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question