-
Jan 5th, 2005, 06:10 AM
#1
css/javascript - Webpage Menubar
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.
-
Feb 11th, 2021, 11:28 PM
#2
Member
Re: css/javascript - Webpage Menubar
Hello,@tr333
Please try this code, To How to create menubar using the CSS and Javascript.
Code:
<!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.
< advertising removed by moderator >
-
Feb 12th, 2021, 02:50 AM
#3
Re: css/javascript - Webpage Menubar
Just 16 years to late..
Do ever check the posting dates of the threads you reply to?
-
Feb 13th, 2021, 06:24 PM
#4
Re: css/javascript - Webpage Menubar
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!
Last edited by Peter Porter; Feb 13th, 2021 at 06:44 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|