# VBForums CodeBank > CodeBank - JavaScript >  css/javascript - Webpage Menubar

## tr333

The code on this page shows you how to create a menubar (or multiple menubars) for your webpage using only HTML, W3C CSS, and Javascript.  The code has been released under the GNU/GPL.

http://www.brainjar.com/dhtml/menubar/


Note:  i have no affiliation with the guy who wrote this.

----------


## Sherin

Hello,@tr333
Please try this code, To How to create menubar using the CSS and Javascript.



```
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.topnav {
  overflow: hidden;
  background-color: #333;
}

.topnav a {
  float: left;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav a:hover {
  background-color: #ddd;
  color: black;
}

.topnav a.active {
  background-color: #4CAF50;
  color: white;
}
</style>
</head>
<body>

<div class="topnav">
  <a class="active" href="#home">Home</a>
  <a href="#news">News</a>
  <a href="#contact">Contact</a>
  <a href="#about">About</a>
</div>

<div style="padding-left:16px">
  <h2>Top Navigation Example</h2>
  <p>Some content..</p>
</div>

</body>
</html>
```

I hope this code will be useful to you.
Thank you.

----------


## Arnoutdv

Just 16 years to late..
Do ever check the posting dates of the threads you reply to?

----------


## Peter Porter

Sherin, if you have another way of performing a function, start your own thread!

Don't purposely search for similar threads so you could show-off!

That's the 4th time you've done this here!

----------

