JSFiddle - React, Tailwind, and code Playground
HTML
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/* CSS */
* {box-sizing: border-box}
body {
margin-left: 15%;
margin-right: 15%;
}
.navbar {
overflow: hidden;
background-color: #104e8B;
position: sticky;
position: -webkit-sticky;
top: 0;
border: 1px solid #ccc;
border-right: none;
}
.navbar a {
float: left;
padding: 6px;
color: white;
text-decoration: none;
font-size: 15px;
width: 20%; /* Five links of equal widths */
text-align: center;
border-left: 1px solid #fff;
border-right: 1px solid #ccc;
}
.navbar a:hover:not(.active) {
background-color: #AA0000;
color: white;
}
.navbar a:hover {
background-color: #AA0000;
color: white;
}
.active {
background-color: #10CCCC;
color: white;
}
</style>
</head>
<body>
<div class="navbar" id="Menu">
<a id='home' href="/">Home</a>
<a id='about' href="/about">About</a>
<a id='research' href="/research">Research</a>
<a id='cv' href="/cv" class="right">CV</a>
<a id='blog' href="/blog" class="right">Blog</a>
</div><!-- Menu-->
</body>
<script>
$(document).ready(function() {
$('#research').addClass('active');
});
</script>
</html>