navigation-correction

In this example below you will see how to do a navigation-correction with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by koushik91, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright koushik91 ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>navigation-correction</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="container">
  <h1>THE FIRST NAVIGATION</h1>
  	<ul class="nav1">
      <li><a href="#">Home</a></li>
      <li><a href="#">News</a></li>
      <li><a href="#">Photos</a></li>
      <li><a href="#">Videos</a></li> 
  	</ul> 
  <h1>THE SECOND NAVIGATION</h1>
  	<ul class="nav2">
      <li><a href="#">Home</a></li>
      <li><a href="#">News</a></li>
      <li><a href="#">Photos</a></li>
      <li><a href="#">Videos</a></li> 
  	</ul>
  <h1>THE THIRD NAVIGATION</h1>
  	<ul class="nav3">
      <li><a href="#">Home</a></li>
      <li><a href="#">News</a></li>
      <li><a href="#">Photos</a></li>
      <li><a href="#">Videos</a></li> 
  	</ul> 
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/koushik91/navigation-correction-aAgvx */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 100%;
  vertical-align: baseline;
}

html {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

caption, th, td {
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}

q, blockquote {
  quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
  content: "";
  content: none;
}

a img {
  border: none;
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
  display: block;
}

h1 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  color: #3A3D44;
}

ul.nav1 {
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  *zoom: 1;
  margin: 20px 0px;
}
ul.nav1 li {
  list-style-image: none;
  list-style-type: none;
  margin-left: 0;
  display: inline-block;
  vertical-align: middle;
  *vertical-align: auto;
  *zoom: 1;
  *display: inline;
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
}
ul.nav1 a {
  text-decoration: none;
  display: inline-block;
  padding: 10px 20px;
  color: #199cd3;
}
ul.nav1 a:hover {
  text-decoration: underline;
}

ul.nav2 {
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  *zoom: 1;
  margin: 20px 0px;
}
ul.nav2 li {
  list-style-image: none;
  list-style-type: none;
  margin-left: 0;
  display: inline-block;
  vertical-align: middle;
  *vertical-align: auto;
  *zoom: 1;
  *display: inline;
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
}
ul.nav2 a {
  display: inline-block;
  text-decoration: none;
  color: #199cd3;
  padding: 10px 20px;
}
ul.nav2 a:hover {
  background-color: #199cd3;
  color: #fff;
}

ul.nav3 {
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  *zoom: 1;
  margin: 20px 0px;
  background-color: #666666;
}
ul.nav3 li {
  list-style-image: none;
  list-style-type: none;
  margin-left: 0;
  display: inline-block;
  vertical-align: middle;
  *vertical-align: auto;
  *zoom: 1;
  *display: inline;
  white-space: nowrap;
  font-family: Arial, Helvetica, sans-serif;
}
ul.nav3 a {
  display: inline-block;
  text-decoration: none;
  color: #199cd3;
  padding: 10px 20px;
}
ul.nav3 a:hover {
  background-color: #199cd3;
  color: #fff;
}

Comments