nav bar(html, css)

In this example below you will see how to do a nav bar(html, css) with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by buzz_lightyear, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright buzz_lightyear ©

Technologies

  • HTML
  • CSS
  • JavaScript
    <head>
  <link href="https://fonts.googleapis.com/css?family=Slackey" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Encode+Sans:400" rel="stylesheet">
  <link href="css/style.css" rel="stylesheet"  type="text/css">
  <meta charsheet="UTF-8">
</head>

<body>
  <header>
    <div class="container">
      <h1 id="logo">Bishal</h1>
      <nav>
        <ul>
           <li><a href="#">About Me</li>
           <li><a href="#">Portfolio</li>
           <li><a href="#">Contact me</li>
        </ul>    
    </div>
  </header>
</body>

  

/*Downloaded from https://www.codeseek.co/buzz_lightyear/nav-barhtml-css-BwmRYx */
    body {
  margin: 0;
  background: #222;
  font-family: 'Encode Sans', sans-serif;
  font-weight: 400;
}

.container {
  width: 80%;
  margin: 0 auto;
}

header {
  background-color: #55d6aa;
}

header::after {
  content: " ";
  display: table;
  clear: both;
}
#logo{
  width: 0;
  display: inline-block;
  margin-left: -70px;
  
  
}

nav{
  float: right; 
}

nav ul {
  margin: 0;
  padding: 0px;
  list-style: none;
  margin-right: -60px;
}

nav li {
  display: inline-block;
  margin-left: 70px;
  padding-top: 30px;
  position: relative;
}

nav a {
  text-decoration: none;
  text-transform: uppercase;
  color: #0c121c;
  font-size: 20px;
}

nav a:hover {
  color: yellow;
}




/*Downloaded from https://www.codeseek.co/buzz_lightyear/nav-barhtml-css-BwmRYx */
    

Comments