JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {box-sizing: border-box}
body {font-family: Arial, Helvetica, sans-serif;}

.navbar {
  width: 100%;
  height: 45px;
  background-color: #555;
}

.navbar a {
  float: left;
  padding: 12px;
  color: white;
  text-decoration: none;
  font-size: 17px;
  width: 25%; /* Four links of equal widths */
  text-align: center;
}

.navbar a:hover {
  background-color: #000;
  height: 1500px;
}

.navbar a.active {
  background-color: #4CAF50;
}

@media screen and (max-width: 500px) {
  .navbar a {
    float: none;
    display: block;
    width: 100%;
    text-align: left;
  }
}
</style>
<body>

<h2>Responsive Navbar with Links of Same Width</h2>
<p>Try to resize the browser window to see the responsive effect.</p>

<div class="navbar">
  <a class="active" href="#">Home</a> 
  <a href="#">Search</a> 
  <a href="#">Contact</a> 
  <a href="#">Login</a>
</div>

</body>
</html>