HTML & CSS
Code:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#menu {
float: left;
}
ul#menu li {
display:inline;
font-family:Arial,Helvetica,sans-serif;
font-size:0.8em;
border:2px solid #83F52C;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
width: 80px;
height: auto;
}
ul#menu a
{
padding:8px 8px 8px 8px;
text-decoration:none;
font-weight:bold;
color:#83129E;
}
ul#menu a:hover{
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
color:#c6c6c6;
}
</style>
</head>
<body>
<ul id="menu">
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">the Team</a></li>
<li><a href="#">Resources</a></li>
<li><a href="#">Tutorials</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</body>
</html>
What It does:
Code:
ul#menu li {
display:inline;
font-family:Arial,Helvetica,sans-serif;
font-size:0.8em;
border:2px solid #83F52C;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
width: 80px;
height: auto;
}
The ul#menu li code is calling on the ul id menu which you can see as
Code:
<ul id="menu"></div>
This styles the menu with in that div using the ul and li codes which is known as an Un orded list. The display inline of the code is displayed as an inline element like a span, the inline element has no line break before or after it, It allows other HTML elements next to it like the result giving below:
Code:
Home About Services
Where with out it it would look like this:
The border radius element is part of CSS3 its pretty much an easier way of getting rounded corners with out the use of images or more div tags
This part of the code allows browsers using webkit such as chrome and safari to view the code, with out the webkit element the rounded corners would not be viewable to users using the menu
Code:
-webkit-border-radius: 15px;
The -moz element makes the code viewable to those using firefox
Code:
-moz-border-radius: 15px;
Code:
ul#menu a
{
padding:8px 8px 8px 8px;
text-decoration:none;
font-weight:bold;
color:#83129E;
}
This part of the code is self explanatory its sourcing the 'a' within the code and styling it making the font bold with the color of purple
Code:
ul#menu a:hover{
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
color:#c6c6c6;
}
The a:hover part of the CSS is also self explanatory all it is doing is saying when a is hovered over return the text color of light grey.
I hoped this help you if you have any questions feel free to pm me
The Result:
http://www.lampstudios.net/css3