Reputation: 15
.navigation {
padding: 0;
margin: 0;
background: #333;
position: fixed;
top: 0;
z-index: 999;
width: 100%;
li {
display: inline-block;
padding: 5px 10px;
a {
color: #e1e1e1;
text-decoration: none;
&:hover{
color: lighten(#e1e1e1, 20%);
}
}
}
i am trying to create a menu bar which is in horizontal format. i have already tried using display: inline-block but still i am having problem with it. I even tried using display: inline but it seems its not solving. can anyone help me to solve this.
Upvotes: 0
Views: 38
Reputation: 12923
are you writing this in scss? I'm guessing your nesting is off because it works fine in regular css:
.navigation {
padding: 0;
margin: 0;
background: #333;
position: fixed;
top: 0;
z-index: 999;
width: 100%;
}
li {
display: inline-block;
padding: 5px 10px;
}
a {
color: #FFF;
text-decoration: none;
}
a:hover{
color: lighten(#e1e1e1, 20%);
}
looks like you're missing the last }
that would close .navigation
. Try that UPDATE: thats the answer: NEW FIDDLE
Upvotes: 1