JSFiddle - React, Tailwind, and code Playground
HTML
<script src="<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>"></script>
<ul class="myMenu">
<!-- link 1 -->
<li class="new-dropdown1">
<a id="services" href="#" class="link-hover">Home</a>
<ul class="new1">
<li><a href="<?php echo site_url('/structural-capital');?>">Structural-Capital</a></li>
<li><a href="<?php echo site_url('/financial-advisory');?>">Financial-Advisory</a></li>
<li><a href="<?php echo site_url('/investment-capital');?>">Investment-Capital</a></li>
</ul>
</li>
<!-- link 2 -->
<li class="new-dropdown1">
<a id="services" href="#" class="link-hover">Our Services</a>
<ul class="new1">
<li><a href="<?php echo site_url('/structural-capital');?>">Structural-Capital</a></li>
<li><a href="<?php echo site_url('/financial-advisory');?>">Financial-Advisory</a></li>
<li><a href="<?php echo site_url('/investment-capital');?>">Investment-Capital</a></li>
</ul>
</li>
</ul>
CSS
ul {
padding: 0;
font-family: 'roboto';
}
a {
text-decoration: none;
}
li {
list-style: none;
}
.myMenu {
border-bottom: 2px solid #FFF02A;
position: relative;
height: 70px;
}
.myMenu > li {
line-height: 3;
display: inline-block;
vertical-align: top;
height: 100%;
}
.myMenu-active a {
color: #666 !important;
}
.myMenu > li > a {
display: block;
font-size: 20px;
height: 100%;
box-sizing: border-box;
}
.myMenu > li > * {
line-height: 1.2;
text-decoration: none;
padding: 5px;
color: #222;
}
/* line 1164, ../scss/_custom.scss */
li.new-dropdown, li.new-dropdown1 {
position: relative;
}
/* line 1167, ../scss/_custom.scss */
ul.new, ul.new1 {
top: 70px;
position: absolute;
display: none;
z-index: 100;
overflow: hidden;
text-overflow: ellipsis;
background: #FFF02A;
}
/* line 1177, ../scss/_custom.scss */
.myMenu li ul {
white-space: nowrap;
}
/* line 1181, ../scss/_custom.scss */
ul.new li > a, ul.new1 li > a {
color: #000;
width: 100%;
/*border-bottom: 1px solid black;*/
}
/* line 1186, ../scss/_custom.scss */
ul.new li > a:hover, ul.new1 li > a:hover {
color: #000 !important;
}
/* line 1190, ../scss/_custom.scss */
ul.new li > a.active, ul.new1 li > a.active {
color: #000 !important;
font-family: 'Neuzeit Grotesk W01';
font-style: normal;
font-weight: bolder;
}
JavaScript
$(document).ready(function () {
function openSubMenu() {
event.stopPropagation();
$(this).addClass('myMenu-active');
$(this).find('ul').css('visibility', 'visible').stop().slideDown(200);
}
function closeSubMenu() {
event.stopPropagation();
var $elem = $(this);
$elem.find('ul').stop().slideUp(200, function () {
$elem.removeClass('myMenu-active');
});
}
$('.myMenu > li').on('mouseenter', openSubMenu);
$('.myMenu > li').on('mouseleave', closeSubMenu);
});