Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials Create a Simple Menu in CSS
Your Ad Here

Create a Simple Menu in CSS


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="/img_articles/15093/#" mce_href="/img_articles/15093/#">HOME</a></div>
<div><a href="/img_articles/15093/#" mce_href="/img_articles/15093/#">SERVICES</a></div>
<div><a href="/img_articles/15093/#" mce_href="/img_articles/15093/#">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="/img_articles/15093/#" mce_href="/img_articles/15093/#">HOME</a></div>
<div><a href="/img_articles/15093/#" mce_href="/img_articles/15093/#">SERVICES</a></div>
<div><a href="/img_articles/15093/#" mce_href="/img_articles/15093/#">CONTACT</a></div></center>
</body>
</html>

That's it! Here is the final result!



Author's URL: PiticStyle
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "Create a Simple Menu in CSS"

Only registered users can write comment

No comments yet...