1
You can put a span
invisible inside each link that will only appear when the mouse passes over the link.
CSS:
body{ background: #000;}
a{ color: #fff;}
li{ padding: 0px; margin: 0px; list-style: none; display: inline-block; float: left; margin: 10px; position: relative;}
ul{ padding: 0px; margin: 0px;}
li span{
display: none; width: 1px; background: #fff; position:absolute; bottom: 100%; height: 1000px; left: 50%; margin-left: -1px;
}
li:hover span{ display: inline-block;}
HTML:
<ul>
<li>
<a href="">Link1</a>
<span></span>
</li>
<li>
<a href="">Link2</a>
<span></span>
</li>
</ul>
Fiddle: https://jsfiddle.net/vqfr54w4/
Zipper, thank you David, that’s exactly it
– Henrique
@Henry Anything, my friend.
– Sam
David and in case I want to let the bar appear type an active, leave it active for page that is being displayed, as I would?
– Henrique