JSFiddle - React, Tailwind, and code Playground

by envira

HTML

<link rel="stylesheet" href="http://fortawesome.github.io/Font-Awesome/assets/font-awesome/css/font-awesome.css">
<div class="navigation">
<div class="wrap">
<div class="logo">
<a href="http://www.myskins.org" title="click to visit MySkins Studio">
    <img src="http://myskins.org/images/myskins/logo3.png">
</a>
</div>
<div class="enmenuwrap">
    <a class="enmenu" href="#"><i class="fa fa-cog"></i> Settings</a>
<div class="ensettings">
    <ul>
        <li><a href="http://www.myskins.org"><i class="fa fa-user"></i> User CP</a></li>
        <li><a href="http://www.myskins.org"><i class="fa fa-envelope"></i> Inbox</a></li>
        <li><a href="http://www.myskins.org"><i class="fa fa-users"></i> Buddy List</a></li>
        <li><a href="http://www.myskins.org"><i class="fa fa-power-off"></i> Logout</a></li>
    </ul>
</div>
</div>
</div>
</div>

CSS

body {
    padding: 0;
    margin: 0;
    background: #e9e9e9;
}

.navigation {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    height:50px;
    line-height: 50px;
    margin-top: 30px;
}

.wrap {
    width: 90%;
    margin: 0 auto;
}

.logo {
  float: left;
  width: 100px;
  height: auto;
  display: inline-block;
  margin-top: -25px;
}

.enmenuwrap {
  float: right;
  display: inline-block;
  position: relative;
}


.enmenu {
  background: #F5F5F5;
  display: inline-block;
  padding: 0px 10px;
  position: relative;
  cursor: pointer;
  height: 50px;
  line-height: 50px;
  color: #e04006;
  text-decoration: none;
  border-radius: 2px;
  font-family: 'Trebuchet MS',Helvetica,Arial,sans-serif;
  float: right;
}

.ensettings {
  display: none;
  position: absolute;
  right: 0;
  left: auto;
  min-width: 150px;
  background: #e04006;
  color: #555;
  top: 50px;
  border-radius: 2px;
  padding: 0;
  margin: 0;
  z-index: 999999;
  font-family: 'Trebuchet MS',Helvetica,Arial,sans-serif;
  box-shadow: 0px 0px 1px #ddd;
}

.ensettings::before {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  content: "";
  position: absolute;
  border-bottom: 5px solid #e04006;
  top: -5px;
  right: 10px;
  float: right;
}

.ensettings ul {
    padding: 0;
    margin: 0;
}

.ensettings ul > li {
  list-style: none;
  padding: 0;
}

.ensettings ul > li > a {
  text-decoration: none;
  color: #FFF;
  display: block;
  padding: 0px 10px;
  transition: all 0.2s ease-in-out;
  font-size: 12px;
}

.ensettings ul > li > a:hover {
    background: #FFF;
    color: #e04006;
}

.ensettings ul > li > a > i {
    float: right;
    display:inline-block;
    line-height: 50px;
}

JavaScript

jQuery(document) .ready(function() {	
$('.enmenu').on('click', function(){
		$('.ensettings').slideToggle('100');
		return false;
	});
	$('html, body').on('click',function(){
		$('.ensettings').slideUp('100');
	});
	$(".ensettings").click(function(e){
		e.stopPropagation();
	});
});