Answers for "navigation bar html template"

4

navigation bar css template

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Navbar</title>

<style>
body {
margin: 0;
}
.navbar{
padding: 15px;
background-color: grey;
display: flex;
justify-content: space-between;
font-size: 30px;
text-decoration: none;
color: #fff;
}
    .nav-item {
    margin: 0;
    padding: 0;
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: space-evenly;
    font-size: 25px;
    }
    .nav-link {
    display: inline-block;
    }
    a{
    text-decoration: none;
    color: #fff;
    }

    @media (max-width: 715px) {
    .nav-item {
    flex-direction: column;
    align-items: center;
    }
    .nav-link {
    margin: 5px 0;
    }
    }
</style>


</head>
<body>
<nav class="navbar">
    <a class="brand" href="">Navebar</a>
    <ul class="nav-item">
        <li class="nav-link"><a href="">Learn more</a></li>
        <li class="nav-link"><a href="">About</a></li>
        <li class="nav-link"><a href="">Contact</a></li>
    </ul>
    <a class="home" href="">Home</a>
</nav>
</body>
</html>
Posted by: Guest on July-23-2021
2

html navigation bar template

<!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: cyan;
  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: gold;
  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>
  
</div>

</body>
</html>
Posted by: Guest on September-21-2021
1

html menu bar template

<!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: cyan;
  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: gold;
  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>By Yasin</p>
</div>

</body>
</html>
Posted by: Guest on July-12-2021
1

navigation bar css template

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">      




Use the link above  in your code, between head, for bootstrap because the 
code below is used with bootstrap.
Change the names and links to whatever you want, but don't change the
class just make a custom class within that.
     
     

<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
      <a class="navbar-brand" href="">Brand name</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse"id="navbarSupportedContent">
    <ul class="navbar-nav ml-auto">
        <li class="nav-item">
            <a class="nav-link" href="#top">TOP</a>
        </li>
        <li>
            <a class="nav-link" href="#middle">MIDDLE</a>
        </li>
        <li>
            <a class="nav-link" href="#bottom">BOTTOM</a>
        </li>
    </ul>
</nav>
Posted by: Guest on July-14-2021

Browse Popular Code Answers by Language