How To Make Simple SideBar Menu Using HTML JavaScript

Submitted by: 
Language: 
Visitors have accessed this post 2749 times.

This sidebar menu not only handles your every menu that you have, with the help of CSS animation techniques you can absolutely arrange it, or you can combined it. Compress your sidebar menu with the flat designed that we have.

If you have a lot of menus in your site, you can use this sidebar menu to minimize it all. In this work, it's only one sub-menu but you can customize it. You can make it more than one sub-menu. It depends on you on how you work this. You can easily to understand and learn from this project.

Direction:

First: Kindly copy the following code below to the HEAD section of your page.

  1. <meta charset='utf-8'>
  2. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  3. <meta name="viewport" content="width=device-width, initial-scale=1">
  4. <link rel="stylesheet" href="css/styles.css">
  5. <script src="js/code.js" type="text/javascript"></script>
  6. <script src="js/script.js"></script>
  7. <title>SideBar Menu</title>

*Just DOWNLOAD the source code for the external files. ( Kindly click below the "Download Code" )

Second: Add the code below to your BODY section of the page.

  1. <div id='cssmenu'>
  2. <ul>
  3. <li><a href='<a href="https://www.sourcecodester.com/'><span>Home</span></a></li>
  4. ">https://www.sourcecodester.com/'><span>Home</span></a></li>
  5. </a> <li class='active has-sub'><a href='#'><span>Programming</span></a>
  6. <ul>
  7. <li><a href='<a href="https://www.sourcecodester.com/visual-basic'><span>Visual">https://www.sourcecodester.com/visual-basic'><span>Visual</a> Basic</span></a></li>
  8. <li><a href='<a href="https://www.sourcecodester.com/visual-basic-net'><span>Visual">https://www.sourcecodester.com/visual-basic-net'><span>Visual</a> Basic .NET</span></a></li>
  9. <li><a href='<a href="https://www.sourcecodester.com/asp'><span>ASP/ASP">https://www.sourcecodester.com/asp'><span>ASP/ASP</a> .NET</span></a></li>
  10. <li><a href='<a href="https://www.sourcecodester.com/c-sharp'><span>C#</span></a></li>
  11. ">https://www.sourcecodester.com/c-sharp'><span>C#</span></a></li>
  12. </a> <li><a href='<a href="https://www.sourcecodester.com/cpp'><span>C/C++</span></a></li>
  13. ">https://www.sourcecodester.com/cpp'><span>C/C++</span></a></li>
  14. </a> <li><a href='<a href="https://www.sourcecodester.com/delphi'><span>Delphi</span></a></li>
  15. ">https://www.sourcecodester.com/delphi'><span>Delphi</span></a></li>
  16. </a> <li><a href='<a href="https://www.sourcecodester.com/java'><span>Java</span></a></li>
  17. ">https://www.sourcecodester.com/java'><span>Java</span></a></li>
  18. </a> <li><a href='<a href="https://www.sourcecodester.com/javascript'><span>JavaScript</span></a></li>
  19. ">https://www.sourcecodester.com/javascript'><span>JavaScript</span></a></...</a> <li><a href='<a href="https://www.sourcecodester.com/microsoft-access'><span>Microsoft">https://www.sourcecodester.com/microsoft-access'><span>Microsoft</a> Access</span></a></li>
  20. <li><a href='<a href="https://www.sourcecodester.com/php'><span>PHP</span></a></li>
  21. ">https://www.sourcecodester.com/php'><span>PHP</span></a></li>
  22. </a> <li><a href='<a href="https://www.sourcecodester.com/sql'><span>SQL</span></a></li>
  23. ">https://www.sourcecodester.com/sql'><span>SQL</span></a></li>
  24. </a> <li><a href='<a href="https://www.sourcecodester.com/foxpro'><span>Visual">https://www.sourcecodester.com/foxpro'><span>Visual</a> FoxPro</span></a></li>
  25. <li><a href='<a href="https://www.sourcecodester.com/html'><span>HTML/CSS</span></a></li>
  26. ">https://www.sourcecodester.com/html'><span>HTML/CSS</span></a></li>
  27. </a> </ul>
  28. </li>
  29. <li class='last'><a href='<a href="https://www.sourcecodester.com/contact'><span>Contact</span></a></li>
  30. ">https://www.sourcecodester.com/contact'><span>Contact</span></a></li>
  31. </a> <li class='active has-sub'><a href='#'><span>Others</span></a>
  32. <ul>
  33. <li><a href='<a href="https://www.sourcecodester.com/mobile'><span>Mobile</span></a></li>
  34. ">https://www.sourcecodester.com/mobile'><span>Mobile</span></a></li>
  35. </a> <li><a href='<a href="https://www.sourcecodester.com/blog'><span>Blog</span></a></li>
  36. ">https://www.sourcecodester.com/blog'><span>Blog</span></a></li>
  37. </a> <li><a href='<a href="https://www.sourcecodester.com/article'><span>Articles</span></a></li>
  38. ">https://www.sourcecodester.com/article'><span>Articles</span></a></li>
  39. </a> <li><a href='<a href="https://www.sourcecodester.com/tutorial'><span>Tutorials</span></a></li>
  40. ">https://www.sourcecodester.com/tutorial'><span>Tutorials</span></a></li>
  41. </a> </ul>
  42. </li>
  43. </ul>
  44. </div>

Hope this simple project will help you in your future work.


Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.