HTML and CSS  Home HTML and CSS Tutorials Create a Simple Menu in CSS
rss

Create a Simple Menu in CSS

Author: PiticStyle More by this author


Today we create a simple MENU in CSS.

1. Let's to create the CSS:

<style type="text/css">
body {
text-align: left;
background-image: url("bg.gif");
}
div {
width: 100px;
height: 20px;
background-color: #338ce8;
}
div:hover
{
background-color: #085ea6;
}
a {
color: white;
font-size: 18px;
text-decoration: none;
}
</style>

Note: text-decoration: none; I put this expression to remove the line under the link!

2. Now we need to create the HTML code:

<html>
<body>
<head>
<title>Create a simple Menu in CSS</title>
/* Here is the CSS code */
</head>
<body><center><h1><u>Create a simple Menu in CSS</u></h1>
<br><br>
<div><a href="#" mce_href="#">HOME</a></div>
<div><a href="#" mce_href="#">SERVICES</a></div>
<div><a href="#" mce_href="#">CONTACT</a></div></center>
</body>
</html>

The entire code:

<html>
<body>
<head>
<title>Create a simple Menu in CSS</title>
<style type="text/css">
body {
text-align: left;
background-image: url("bg.gif");
}
div {
width: 100px;
height: 20px;
background-color: #338ce8;
}
div:hover
{
background-color: #085ea6;
}
a {
color: white;
font-size: 18px;
text-decoration: none;
}
</style>
</head>
<body><center><h1><u>Create a simple Menu in CSS</u></h1>
<br><br>
<div><a href="#" mce_href="#">HOME</a></div>
<div><a href="#" mce_href="#">SERVICES</a></div>
<div><a href="#" mce_href="#">CONTACT</a></div></center>
</body>
</html>

That's it! Here is the final result!



Author's URL: www.piticstyle.com

Rate this Material: Bad 1 2 3 4 5 Excellent
print this page tell a friend subscribe to newsletter subscribe to rss

Add comments to "Create a Simple Menu in CSS"