Results 1 to 4 of 4

Thread: css/javascript - Webpage Menubar

  1. #1

    Thread Starter
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    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.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  2. #2
    Member
    Join Date
    Jul 2019
    Location
    Ahmedabad
    Posts
    57

    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 >

  3. #3
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,854

    Re: css/javascript - Webpage Menubar

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

  4. #4
    Fanatic Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    532

    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
  •  



Click Here to Expand Forum to Full Width