Blogger Navigation bar Code

              How to Create Navigation Bar ?

Here's an example code snippet for a navigation bar using HTML and CSS:

HTML:

<nav>
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li>
      <a href="#">Products</a>
      <ul>
        <li><a href="#">Product 1</a></li>
        <li><a href="#">Product 2</a></li>
        <li><a href="#">Product 3</a></li>
      </ul>
    </li>
    <li><a href="#">Contact</a></li>
  </ul>
</nav>

CSS:

<style>
nav {
  background-color: #333;
  height: 50px;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

li {
  float: left;
  height: 100%;
  position: relative; /* Add this line to position sub-menu correctly */
}

a {
  display: block;
  color: white;
  text-align: center;
  padding: 16px;
  text-decoration: none;
}

a:hover {
  background-color: #111;
}

/* sub-menu styles */

ul ul {
  display: none;
  position: absolute;
  top: 50px;
  left: 0;
  background-color: #333;
  width: 200px;
}

ul li:hover > ul {
  display: block;
}

ul ul li {
  float: none;
  position: relative;
}

ul ul ul {
  position: absolute;
  left: 200px;
  top: 0;
}
</style>

Other for blogger:

<b:includable>
  <b:widget>
    <b:widget id='Navbar1' locked='false' title='Navbar' type='Navbar' version='2' visible='true'>
      <b:includable id='main'>&lt;script type=&quot;text/javascript&quot;&gt;
        function setAttributeOnload(object, attribute, val) {
          if (window.addEventListener) {
            window.addEventListener('load', function () { object[attribute] = val; }, false);
          } else {
            window.attachEvent('onload', function () { object[attribute] = val; });
          }
        }
      &lt;/script&gt;
      &lt;div id=&quot;navbar-iframe-container&quot;&gt;&lt;/div&gt;
      &lt;script type=&quot;text/javascript&quot; src=&quot;https://apis.google.com/js/plusone.js&quot;&gt;&lt;/script&gt;
      &lt;script type=&quot;text/javascript&quot;&gt;
        gapi.load('gapi.iframes:gapi.iframes.style.bubble', function () {
          if (gapi.iframes && gapi.iframes.getContext) {
            gapi.iframes.getContext().openChild({
              url: 'https://www.blogger.com,
              where: document.getElementById('navbar-iframe-container'),
              id: 'navbar-iframe'
            });
          }
        });
      &lt;/script&gt;
      &lt;script type=&quot;text/javascript&quot;&gt;
        (function () {
          var script = document.createElement('script');
          script.type = 'text/javascript';
          script.src = 
          var head = document.getElementsByTagName('head')[0];
          if (head) {
            head.appendChild(script);
          }
        })();
      &lt;/script&gt;
      </b:includable>
    </b:widget>
  </b:widget>
</b:includable>
</b:section>
</div>
<div class='clearfix' />
</div>
</div>
<div class='clearfix' />

Comments

Popular posts from this blog

How to fix SSL Certificate Issues?

How to Fix Website Mixed Content Issues?

How to Fix Mobile Responsiveness Issues?

Popular posts from this blog

How to fix SSL Certificate Issues?

How to Fix Website Mixed Content Issues?

How to Fix Mobile Responsiveness Issues?