Answer the question
In order to leave comments, you need to log in
How to make a correct border?
Hello!
I'm learning layout now - I'm gaining experience, and I got such a moment, the solution of which I have not yet found while playing with a lot of guesses.
I have a menu. (the code looks scary)
<header>
<div class="content-logo"><span>Matthew Greenberg</span></div>
<nav class="content-nav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Some stuff</a></li>
<li><a href="#">Query lib</a></li>
<li><a href="#">Embeds</a></li>
<li><a href="#">Inspiration</a></li>
<li><a href="#">contact</a></li>
<li><a href="#">about</a></li>
</ul>
</nav>
</header>
header {
height: 70px;
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2);
overflow: hidden;
}
.content-nav {
position: relative;
z-index: 1;
}
.content-nav ul {
padding: 0;
margin:0;
color:white;
position: relative;
z-index: 10;
overflow: visible;
}
.content-nav ul li {
display: inline-block;
color: white;
line-height: 70px;
position: relative;
}
.content-nav ul li:hover {
border-bottom:2px solid black;
opacity: 1;
}
.content-nav ul li a {
position: absolute;
display: block;
padding-left: 5px;
text-decoration: none;
color: #303030;
font-family: "Lato";
/*height: 100%;*/
opacity: .5;
}
.content-nav ul li a:hover {
border-bottom:2px solid black;
opacity: 1;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question