Basic right side navigation menu
#nav {
float: right;
padding: 42px 0 0 30px;
}
#nav li {
float: left;
margin: 0 0 0 5px;
}
#nav li a {
padding: 5px 15px;
font-weight: bold;
color: rgba(255, 255, 255, 0.7);/* the white at 70% opacity via RGBA lets the background shine through, ever so slightly.*/
}
/*“When using RGBA to assign color values, it’s good practice to specify a solid color first,
as a fallback for browsers that don’t yet support RGBA. Specify solid backups for RGBA colors
in a separate rule that appears before the RGBA rule.”*/
#nav li a {
padding: 5px 15px;
font-weight: bold;
color: #ccc;
color: rgba(255, 255, 255, 0.7);
}
/*“let’s add a very subtle text-shadow. We’ll use RGBA again here to define the shadow’s
color, letting the semi-transparent black at 50% opacity blend into the background behind it.”*/
#nav li a {
padding: 5px 15px;
font-weight: bold;
color: #ccc;
color: rgba(255, 255, 255, 0.7);
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
/*We’re going to add a color change and background color to the :hover state of each link. Once again, we’ll use RGBA to set a semi-transparent
white background behind the text on :hover.*/
#nav li a {
padding: 5px 15px;
font-weight: bold;
color: #ccc;
color: rgba(255, 255, 255, 0.7);
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
#nav li a:hover,
#nav li a:focus {
color: #fff;”
..background: rgba(255, 255, 255, 0.15);
}”
/*Adding border radius for all browsers. */
#nav li a {
padding: 5px 15px;
font-weight: bold;
color: #ccc;
color: rgba(255, 255, 255, 0.7);
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
-webkit-border-radius: 14px;
-moz-border-radius: 14px;
border-radius: 14px;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;”
}/*Note that the border radius would normall be placed on the :hover. But, there's a transition effect here that makes the border pill shape
invisible at it's begining state, and then fully visible on the effect action (hover, focus, etc.).*/
#nav li a:hover,
#nav li a:focus {
color: #fff;
background: rgba(255, 255, 255, 0.15);
}
“<ul id="nav">
<li><a href="#">News</a></li>
<li><a href="#">Things</a></li>
<li><a href="#">Stuff</a></li>
<li><a href="#">Junk</a></li>
<li><a href="#">About</a></li>
</ul>”
<!-- website example: http://css3exp.com/code/view/ -->