How To Make Simple SideBar Menu Using HTML JavaScript

Submitted by: 
Visitors have accessed this post 2872 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.


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="'><span>Home</span></a></li>
  4. ">'><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="'><span>Visual">'><span>Visual</a> Basic</span></a></li>
  8. <li><a href='<a href="'><span>Visual">'><span>Visual</a> Basic .NET</span></a></li>
  9. <li><a href='<a href="'><span>ASP/ASP">'><span>ASP/ASP</a> .NET</span></a></li>
  10. <li><a href='<a href="'><span>C#</span></a></li>
  11. ">'><span>C#</span></a></li>
  12. </a> <li><a href='<a href="'><span>C/C++</span></a></li>
  13. ">'><span>C/C++</span></a></li>
  14. </a> <li><a href='<a href="'><span>Delphi</span></a></li>
  15. ">'><span>Delphi</span></a></li>
  16. </a> <li><a href='<a href="'><span>Java</span></a></li>
  17. ">'><span>Java</span></a></li>
  18. </a> <li><a href='<a href="'><span>JavaScript</span></a></li>
  19. ">'><span>JavaScript</span></a></...</a> <li><a href='<a href="'><span>Microsoft">'><span>Microsoft</a> Access</span></a></li>
  20. <li><a href='<a href="'><span>PHP</span></a></li>
  21. ">'><span>PHP</span></a></li>
  22. </a> <li><a href='<a href="'><span>SQL</span></a></li>
  23. ">'><span>SQL</span></a></li>
  24. </a> <li><a href='<a href="'><span>Visual">'><span>Visual</a> FoxPro</span></a></li>
  25. <li><a href='<a href="'><span>HTML/CSS</span></a></li>
  26. ">'><span>HTML/CSS</span></a></li>
  27. </a> </ul>
  28. </li>
  29. <li class='last'><a href='<a href="'><span>Contact</span></a></li>
  30. ">'><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="'><span>Mobile</span></a></li>
  34. ">'><span>Mobile</span></a></li>
  35. </a> <li><a href='<a href="'><span>Blog</span></a></li>
  36. ">'><span>Blog</span></a></li>
  37. </a> <li><a href='<a href="'><span>Articles</span></a></li>
  38. ">'><span>Articles</span></a></li>
  39. </a> <li><a href='<a href="'><span>Tutorials</span></a></li>
  40. ">'><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 for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


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.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.