JSFiddle - React, Tailwind, and code Playground

by ten1seven

HTML

<ul>
    <li>
        <button>Menu Item 1</button>
    </li>
    <li>
        <a href="#">Menu Item 2</a>
    </li>
    <li>
        <a href="#">Menu Item 3</a>
    </li>
    <li>
        <a href="#">Menu Item 4</a>
    </li>
</ul>

CSS

body {
    background-color: #fff;
}

ul {
    height: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
}
li {
    border-left: 1px solid #ddd;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    float: left;
    width: 25%;
}
li:first-child {
    border-left: none;
}
button, a {
    background-color: #f4f4f4;
    border: none;
    color: #666;
    cursor: pointer;
    display: block;
    font-family: sans-serif;
    font-size: 16px;
    height: 50px;
    line-height: 50px;
    margin: 0;
    padding: 0;
    text-align: center;
    text-decoration: none;
    transition: all 200ms;
    width: 100%;
}
button:hover, a:hover {
    background-color: #ccc;
    color: #222;
}

JavaScript

var links = document.getElementsByTagName('a');
for (var i = 0, len = links.length; i < len; i++) {
    links[i].onclick = function(event) {
        return false;
    }
}