html - Arrow under navigation -
hi i've looked ways place arrow under navigation can't work on navigation bar. appreciated.
<nav> <div class="hello"></div> <ul> <li class="icon-home"><a href="premiership.html"><span>home</span></a></li> <li class="arrow"> <a class="star" href="#">england</a> <ul> <li><a href="premiership.html">premiership</a> </li> <li><a href= "unavailble.html">championship</a> </li> <li><a href="unavailble.html">league 1</a> </li> <li><a href="unavailble.html">league 2</a> </li> </ul> </li> <li class="arrow"> <a href="#">france</a> <ul > <li id="r"><a href="unavailble.html">ligue 1</a> </li> </ul> </li> <li class="arrow"> <a href="#">germany </a> <ul> <li><a href="unavailble.html">bundesliga</a> </li> </ul> </li> <li class="arrow"> <a href="#">italy</a> <ul> <li><a href="unavailble.html">serie a</a> </li> </ul> </li> <li class="arrow"> <a href="#">spain</a> <ul> <li><a href="unavailble.html">la liga</a> </li> </ul> </li> </ul> <div class="handle"> menu </div> </nav>
i thought css work hasn't
li a:after { content: ''; display: none; width: 0; height: 0; border-top: 6px solid #333; border-right: 6px solid transparent; border-left: 6px solid transparent; position: absolute; z-index: 1; top: 100%; left: 50%; margin-left: -6px }
my code https://jsfiddle.net/jzqv6kr0/
in case, arrow there it's overflow:hidden
on ul
means can't see it.
i've adapted code little (see snippet below) requires tweaks might like. i've colored arrow red simplicity.
nav ul { /* overflow:hidden; remove */ } nav ul li.arrow:after { content: ''; width: 0; height: 0; border-top: 6px solid red; border-right: 6px solid transparent; border-left: 6px solid transparent; position: absolute; z-index: 1; top: 100%; left: 50%; margin-left: -6px }
nav ul { background-color: #43a286; color: white; padding: 0; text-align: center; margin: 0; -webkit-transition: max-height 0.4s; -ms-transition: max-height 0.4s; -moz-transition: max-height 0.4s; -o-transition: max-height 0.4s; transition: max-height 0.4s; } nav ul li { display: inline-block; padding: 20px; width: 12.3%; text-align: center; position: relative; } nav ul li:hover { background-color: #399077; } nav ul li.arrow:after { content: ''; width: 0; height: 0; border-top: 6px solid red; border-right: 6px solid transparent; border-left: 6px solid transparent; position: absolute; z-index: 1; top: 100%; left: 50%; margin-left: -6px } nav ul ul { display: none; position: absolute; background-color: #399077; margin-left: -3%; z-index: 150; } nav ul ul li { display: block; width: 75%; text-align: center; } nav ul li:hover ul { margin-top: 2%; display: block; border-bottom-left-radius: 5%; border-bottom-right-radius: 5%; width: 165px; } nav ul li a, visited { color: white; font-family: 'cfjackstory-regular', helvetica, arial, sans-serif; display: block; text-decoration: none; } nav ul ul li a:hover { color: white; font-size: 20px; }
<nav> <div class="hello"></div> <ul> <li class="icon-home"><a href="premiership.html"><span>home</span></a> </li> <li class="arrow"> <a class="star" href="#">england</a> <ul> <li><a href="premiership.html">premiership</a> </li> <li><a href="unavailble.html">championship</a> </li> <li><a href="unavailble.html">league 1</a> </li> <li><a href="unavailble.html">league 2</a> </li> </ul> </li> <li class="arrow"> <a href="#">france</a> <ul> <li id="r"><a href="unavailble.html">ligue 1</a> </li> </ul> </li> <li class="arrow"> <a href="#">germany </a> <ul> <li><a href="unavailble.html">bundesliga</a> </li> </ul> </li> <li class="arrow"> <a href="#">italy</a> <ul> <li><a href="unavailble.html">serie a</a> </li> </ul> </li> </ul> </nav>
Comments
Post a Comment