JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<div class="MenuTable">
<a href="http://www.partsmasterusa.com/"><i class="fa fa-plus-square"></i> Main</a>
<a href="http://www.partsmasterusa.com/about/"><i class="fa fa-building"></i> About</a>
<a href="http://www.partsmasterusa.com/part-inquiry/"><i class="fa fa-info-circle"></i> Part Inquiry</a>
<a href="http://www.partsmasterusa.com/search/"><i class="fa fa-search"></i> Search</a>
<a href="http://www.partsmasterusa.com/cart/"><i class="fa fa-shopping-cart"></i> Cart</a>
<a href="http://www.partsmasterusa.com/checkout/"><i class="fa fa-credit-card"></i> Checkout</a>
<a href="http://www.partsmasterusa.com/my-account/"><i class="fa fa-user"></i> My Account</a>
<a href="<!-- some form page (open it with ajax) -->"><i class="fa fa-power-off"></i> <?php wp_loginout(); ?></a>
</div>
CSS
body
{
margin: 0;
}
.MenuTable
{
display: table;
width: 100%;
}
.MenuTable a
{
display: table-cell;
height: 34px;
vertical-align: middle;
text-align: center;
text-decoration: none;
color: #000;
border-color: #000;
border-style: solid;
border-width: 1px 1px 1px 0px;
}
.MenuTable a:first-child
{
border-width: 1px 1px 1px 1px;
}
.MenuTable a:hover, .MenuTable a.current
{
background: rgb(155, 35, 35);
color: #fff;
}
JavaScript
$(document).ready(function(){
var CurrentPage = location.href;
CurrentPage = 'http://www.partsmasterusa.com/about/'; /* this line is for the jsfiddle demo, delete this line to get it work on your website (the real line is "var CurrentPage = location.href;") */
$('.MenuTable a').each(function(){
var ThisHref = $(this).attr('href');
if (CurrentPage == ThisHref){
$(this).addClass('current');
}
});
});