Skip to content
Fix Code Error

Having trouble with my nav bar/header, It used to work but now it doesn’t

June 19, 2021 by Code Error
Posted By: Anonymous

I’m creating this website for a company for my student co-op and I had this header made for my website and when I made it, it worked completely fine. Now when I check on my phone I press the services button for my dropdown menu and it doesn’t come down, but when I try on the google chrome dev responsive tool, I can click the drop down menu but I also cant unclick the menu. I understand that I have a lot of code written in my CSS file, I do have stuff labeled though like header/home page.

My Issue:

When I click on my responsive navbar when it’s resized to a smaller ratio. I click the bar and my nav menu pulls up but when I click on my services drop down menu It doesn’t come down, Although it works on google chrome responsive dev tools. But when I click the services button and it works the dropdown wont go away when I click it again, how can I fix this? Majority of my navbar is labeled "Header" in my css file. I decided to put my whole file in as maybe something is over writing it but I have no clue it is?

HTML

<!DOCTYPE html>
<html>
<head>
    <!-- Meta Data *IGNORE* !-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="https://unpkg.com/[email protected]/dist/css/ionicons.min.css" rel="stylesheet">
    <link rel="stylesheet" href="css1/headerNewCSS.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.3/css/all.css" integrity="sha384-SZXxX4whJ79/gErwcOYf+zWLeJdY/qpuqC4cAa9rOGUstPomtqpuNWT9wdPEn2fk" crossorigin="anonymous">
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
    
    <!-- Header !-->
    <header>
        <div style="background-color: #1E90FF;" class="container-fluid">
            <nav>
                <div class="menu-icons">
                    <i class="fas fa-bars"></i>
                </div>
                <a href="index.php" class="logo">
                    <img class="logo" src="images/logo_trans.png" alt="logo" style="height: 75px;">
                </a>
                <ul class="nav-list">
                    <!-- Normal listing buttons !-->
                    <li>
                        <a href="index.php">Home</a>
                    </li>
                    <li>
                        <a class="dropdown">Services
                            <i class="fas fa-sort-down"></i>
                        </a>
                        <!-- Drop Down List !-->
                        <ul id="drop-sub" class="sub-menu">
                            <li>
                                <a href="businessPrintingPage1.php">Business Printing</a>
                            </li>
                            <li>
                                <a href="canvasPrintingPage1.php">Canvas Printing</a>
                            </li>
                            <li>
                                <a href="embroideryPage1.php">Embroidery</a>
                            </li>
                            <li>
                                <a href="engravingPage1.php">Engraving</a>
                            </li>
                            <li>
                                <a href="signsPage1.php">Signs</a>
                            </li>
                            <li>
                                <a href="apperalPage1.php">Custom Apperal</a>
                            </li>
                        </ul>
                    </li>
                    <!-- Normal listing buttons !-->
                    <li>
                        <a href="Promotions.php">Promotions</a>
                    </li>

                    <li>
                        <a href="partners.php">Partners</a>
                    </li>

                    <li>
                        <a href="aboutUs.php">About Us</a>
                    </li>
                    
                    <li>
                        <a href="contactUs.php">Contact Us</a>
                    </li>
                    
                    
                    <!-- Cart !-->
                    <li class="move-right">
                        <img class="cart" style="float: right;" src="images/new_cart.png" alt="Cart">
                    </li>
                    
                
                </ul>
            </nav>
        </div>
    </header>
    <!-- Javascript for making a new navbar image for responsiveness !-->
    <script src="javascript/script.js"></script>

CSS

/* DONT TOUCH ANY OF THESE INFORMATION */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

html {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

/* END OF UNTOUCHABLE INFORMATION */

/*-------------------------------------------- STYLING FOR HEADER ----------------------------------------------*/
header {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 999;
}

.container {
  width: 100%;
  max-width: 117rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.menu-icons {
  color: #eee;
  font-size: 4rem;
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 1500;
  display: none;
}

nav {
  display: flex;
  align-items: center;
  width: 100%;
  height: 8rem;
  border-bottom: 1px solid rgba(225, 225, 225, 0.1);
}

.logo {
  display: flex;
  margin-right: 5rem;
}

.nav-list {
  display: flex;
  width: 100%;
  align-items: center;
}

.nav-list li {
  line-height: 8rem;
  position: relative;
}

.sub-menu li {
  line-height: 4rem;
}

.nav-list a {
  display: block;
  color: white;
  background-color: #1e90ff;
  padding: 0 1.5rem;
  font-size: 1.4rem;
  text-transform: uppercase;
  transition: color 650ms;
  transition: background-color 650ms;
}

.nav-list a:hover {
  color: black;
  background-color: yellow;
}

.cart {
  height: 30px;
  width: 40px;
  cursor: pointer;
  margin-right: 15px;
  margin-bottom: 5px;
}

.btn {
  padding: 1.3rem;
  display: inline-block;
  background-color: #1e90ff;
  border: 2px solid #1e90ff;
  border-radius: 5rem;
  transition: background-color 650ms;
}

.btn:hover {
  color: black;
  background-color: yellow;
}

.sub-menu {
  width: 20rem;
  display: block;
  position: absolute;
  border-top: 3px solid #00bfff;
  z-index: 100;
  top: 16rem;
  transition: all 650ms ease;
  opacity: 0;
  visibility: hidden;
}

.sub-menu::before {
  content: "";
  position: absolute;
  top: -2.5rem;
  left: 3rem;
  border: 1.2rem solid transparent;
  border-bottom-color: #00bfff;
}

.sub-menu .sub-menu::before {
  top: 0.9rem;
  left: -2.5rem;
  border: 1.2rem solid transparent;
  border-right-color: #00bfff;
}

.sub-menu .sub-menu {
  border-top: none;
  border-left: 3px solid #00bfff;
  top: 0;
  left: 160%;
}

.nav-list li:hover > .sub-menu {
  top: 8rem;
  opacity: 1;
  visibility: visible;
}

.sub-menu li:hover > .sub-menu {
  top: 0;
  left: 100%;
}

li.move-right {
  margin: auto 0 auto auto;
  line-height: initial;
  transition: color 650ms;
  transition: background-color 650ms;
}
/*-------------------------------------------- STYLING FOR HEADER END ----------------------------------------------*/

/*-------------------------------------------- RESPONSIVENESS FOR HEADER ----------------------------------------------*/
@media screen and (max-width: 1200px) {
  .nav-list {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: none;
    align-items: initial;
    flex-direction: column;
    background-color: #1e90ff;
    z-index: 1000;
    overflow-y: scroll;
  }

  .nav-list li {
    line-height: 6rem;
  }

  .sub-menu {
    position: initial;
    border: 3px solid transparent;
    border-left-color: #00bfff;
    margin-left: 1rem;
    max-height: 0;
     display: none;
  }

  .sub-menu::before {
    display: none;
  }

    .nav-list li:hover > .sub-menu {
    visibility: hidden;
  }
    
    .sub-menu-vis {
    opacity: 1;
     display: block;
    visibility: visible !important;
    max-height: initial;
  }

  li.move-right {
    margin: 0 auto 0 0;
    line-height: initial;
  }

  .menu-icons {
    display: block;
  }

  .fas fa-times {
    display: none;
  }
    
  .dropdown{
     cursor: pointer; 
  }

  nav.active .fas fa-times {
    display: block;
  }

  nav.active .fas fa-bars {
    display: none;
  }

  nav.active .nav-list {
    display: flex;
  }
}
/*-------------------------------------------- RESPONSIVENESS FOR HEADER END ----------------------------------------------*/

/* ----------------------------- STYLING FOR TABLE -------------------------------------- */
/* Table container */
.tableContainer {
    display: flex;
    justify-content: center;
    flex-direction: row;;
}

/* Contents of the table that are being style */
.tableContents {
    display: flex;
    justify-content: center;
    text-align: left;
    margin-top: 10px;
    margin-bottom: 20px;
    flex-direction: row;
}

.tableContents table {
    border-collapse: collapse;
}

.tableContents th {
    background-color: #1e90ff;
    color: white;
    border: 1px solid black;
    padding: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 25px;
}

.tableContents td {
    padding: 8px;
    border: 1px solid black;
}



.tableContents tr {
    background-color: #F0F8FF;
    color: black;
    border: 1px solid black;
    font-size: 15px;
    
}

.tableContents tr:hover {
    background-color: white;

}

table tr:nth-child(odd) {
  background-color: #DCDCDC;
}


/* Fixing margins for phone */
.tablePhoneFix {
        margin-left: 10px;
        display: flex;
        justify-content: center;
    }

/* ----------------------------- STYLING FOR TABLE END -------------------------------------- */











/* ----------------------------- STYLING FOR HERO IMAGE BANNER -------------------------------------- */
.back-test {
    height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(../images/heroImage.jpg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* ----------------------------- STYLING FOR HERO IMAGE BANNER END -------------------------------------- */











/*------------------------------------------- TABLE RESPONSIVENESS ----------------------------------------------*/
@media (max-width: 730px) {
    .tableContainer {
        display: flex;
        justify-content: center;
        flex-direction: column;
        width: 90%;
    }
    
    .tableContents {
        display: flex;
        justify-content: center;
        text-align: left;
        margin-top: 10px;
        margin-bottom: 20px;
        flex-direction: column;
        margin-left: 10px;
}

    .tableContents th {
        background-color: #1e90ff;
        color: white;
        border: 1px solid black;
        padding: 8px;
        padding-top: 12px;
        padding-bottom: 12px;
        font-size: 20px;
}


    .tableContents tr {
        background-color: #F0F8FF;
        color: black;
        border: 1px solid black;
        font-size: 15px;
    
}
    .tablePhoneFix {
        margin-top: 10px;
        margin-left: 0px;
        display: flex;
        justify-content: center;
    }
    
    .back-test {
        height: 200vh;
        background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(../images/heroImage.jpg);
        background-attachment: fixed;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
}

}
/*------------------------------------------- TABLE RESPONSIVENESS END ----------------------------------------------*/

JAVASCRIPT

const selectElement = (element) => document.querySelector(element);

selectElement('.menu-icons').addEventListener('click', () => {
    selectElement('nav').classList.toggle('active');
    });
        
var drop = document.querySelector(".dropdown");     
drop.addEventListener("click", function() {
var sub = document.querySelector("#drop-sub");  
    if(sub.classList.contains("sub-menu-vis")){
        document.getElementById("drop-sub").classList.remove("sub-menu-vis");
        }else{
        document.getElementById("drop-sub").classList.add("sub-menu-vis");
    }
});

Solution

Here is what I have done:
This is a link because there was to much code to put in the snippet.
https://jsfiddle.net/Allan_StackoverFlow/stygwvx7/3/

Javascript:

(function() {
        const selectElement = (element) => document.querySelector(element);

selectElement('.menu-icons').addEventListener('click', () => {
    selectElement('nav').classList.toggle('active');
    });
        
var drop = document.querySelector(".dropdown");     
drop.addEventListener("click", function() {
var sub = document.querySelector("#drop-sub");  
    if(sub.classList.contains("sub-menu-vis")){
        document.getElementById("drop-sub").classList.remove("sub-menu-vis");
        }else{
        document.getElementById("drop-sub").classList.add("sub-menu-vis");
    }
});

})();

There is only room for the javascript. The html and css were edited.

You can get the code from there.

Try This!

UPDATE:
The CSS I updated

/*-------------------------------------------- RESPONSIVENESS FOR HEADER ----------------------------------------------*/
@media screen and (max-width: 1200px) {
  .nav-list {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: none;
    align-items: initial;
    flex-direction: column;
    background-color: #1e90ff;
    z-index: 1000;
    overflow-y: scroll;
  }

  .nav-list li {
    line-height: 6rem;
  }

  .sub-menu {
    position: initial;
    border: 3px solid transparent;
    border-left-color: #00bfff;
    margin-left: 1rem;
    max-height: 0;
     display: none;
  }

  .sub-menu::before {
    display: none;
  }

    .nav-list li:hover > .sub-menu {
    visibility: hidden;
  }
    
    .sub-menu-vis {
    opacity: 1;
     display: block;
    visibility: visible !important;
    max-height: initial;
  }

  li.move-right {
    margin: 0 auto 0 0;
    line-height: initial;
  }

  .menu-icons {
    display: block;
  }

  .fas fa-times {
    display: none;
  }
    
  .dropdown{
     cursor: pointer; 
  }

  nav.active .fas fa-times {
    display: block;
  }

  nav.active .fas fa-bars {
    display: none;
  }

  nav.active .nav-list {
    display: flex;
  }
}
/*-------------------------------------------- RESPONSIVENESS FOR HEADER END ----------------------------------------------*/

_x000D_

_x000D_

    const selectElement = (element) => document.querySelector(element);

selectElement('.menu-icons').addEventListener('click', () => {
    selectElement('nav').classList.toggle('active');
    });
        
var drop = document.querySelector(".dropdown");     
drop.addEventListener("click", function() {
var sub = document.querySelector("#drop-sub");  
    if(sub.classList.contains("sub-menu-vis")){
        document.getElementById("drop-sub").classList.remove("sub-menu-vis");
        }else{
        document.getElementById("drop-sub").classList.add("sub-menu-vis");
    }
});

_x000D_

/* DONT TOUCH ANY OF THESE INFORMATION */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

html {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

/* END OF UNTOUCHABLE INFORMATION */

/*-------------------------------------------- STYLING FOR HEADER ----------------------------------------------*/
header {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 999;
}

.container {
  width: 100%;
  max-width: 117rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.menu-icons {
  color: #eee;
  font-size: 4rem;
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 1500;
  display: none;
}

nav {
  display: flex;
  align-items: center;
  width: 100%;
  height: 8rem;
  border-bottom: 1px solid rgba(225, 225, 225, 0.1);
}

.logo {
  display: flex;
  margin-right: 5rem;
}

.nav-list {
  display: flex;
  width: 100%;
  align-items: center;
}

.nav-list li {
  line-height: 8rem;
  position: relative;
}

.sub-menu li {
  line-height: 4rem;
}

.nav-list a {
  display: block;
  color: white;
  background-color: #1e90ff;
  padding: 0 1.5rem;
  font-size: 1.4rem;
  text-transform: uppercase;
  transition: color 650ms;
  transition: background-color 650ms;
}

.nav-list a:hover {
  color: black;
  background-color: yellow;
}

.cart {
  height: 30px;
  width: 40px;
  cursor: pointer;
  margin-right: 15px;
  margin-bottom: 5px;
}

.btn {
  padding: 1.3rem;
  display: inline-block;
  background-color: #1e90ff;
  border: 2px solid #1e90ff;
  border-radius: 5rem;
  transition: background-color 650ms;
}

.btn:hover {
  color: black;
  background-color: yellow;
}

.sub-menu {
  width: 20rem;
  display: block;
  position: absolute;
  border-top: 3px solid #00bfff;
  z-index: 100;
  top: 16rem;
  transition: all 650ms ease;
  opacity: 0;
  visibility: hidden;
}

.sub-menu::before {
  content: "";
  position: absolute;
  top: -2.5rem;
  left: 3rem;
  border: 1.2rem solid transparent;
  border-bottom-color: #00bfff;
}

.sub-menu .sub-menu::before {
  top: 0.9rem;
  left: -2.5rem;
  border: 1.2rem solid transparent;
  border-right-color: #00bfff;
}

.sub-menu .sub-menu {
  border-top: none;
  border-left: 3px solid #00bfff;
  top: 0;
  left: 160%;
}

.nav-list li:hover > .sub-menu {
  top: 8rem;
  opacity: 1;
  visibility: visible;
}

.sub-menu li:hover > .sub-menu {
  top: 0;
  left: 100%;
}

li.move-right {
  margin: auto 0 auto auto;
  line-height: initial;
  transition: color 650ms;
  transition: background-color 650ms;
}
/*-------------------------------------------- STYLING FOR HEADER END ----------------------------------------------*/

/*-------------------------------------------- RESPONSIVENESS FOR HEADER ----------------------------------------------*/
@media screen and (max-width: 1200px) {
  .nav-list {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: none;
    align-items: initial;
    flex-direction: column;
    background-color: #1e90ff;
    z-index: 1000;
    overflow-y: scroll;
  }

  .nav-list li {
    line-height: 6rem;
  }

  .sub-menu {
    position: initial;
    border: 3px solid transparent;
    border-left-color: #00bfff;
    margin-left: 1rem;
    max-height: 0;
     display: none;
  }

  .sub-menu::before {
    display: none;
  }

    .nav-list li:hover > .sub-menu {
    visibility: hidden;
  }
    
    .sub-menu-vis {
    opacity: 1;
     display: block;
    visibility: visible !important;
    max-height: initial;
  }

  li.move-right {
    margin: 0 auto 0 0;
    line-height: initial;
  }

  .menu-icons {
    display: block;
  }

  .fas fa-times {
    display: none;
  }
    
  .dropdown{
     cursor: pointer; 
  }

  nav.active .fas fa-times {
    display: block;
  }

  nav.active .fas fa-bars {
    display: none;
  }

  nav.active .nav-list {
    display: flex;
  }
}
/*-------------------------------------------- RESPONSIVENESS FOR HEADER END ----------------------------------------------*/

/* ----------------------------- STYLING FOR TABLE -------------------------------------- */
/* Table container */
.tableContainer {
    display: flex;
    justify-content: center;
    flex-direction: row;;
}

/* Contents of the table that are being style */
.tableContents {
    display: flex;
    justify-content: center;
    text-align: left;
    margin-top: 10px;
    margin-bottom: 20px;
    flex-direction: row;
}

.tableContents table {
    border-collapse: collapse;
}

.tableContents th {
    background-color: #1e90ff;
    color: white;
    border: 1px solid black;
    padding: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 25px;
}

.tableContents td {
    padding: 8px;
    border: 1px solid black;
}



.tableContents tr {
    background-color: #F0F8FF;
    color: black;
    border: 1px solid black;
    font-size: 15px;
    
}

.tableContents tr:hover {
    background-color: white;

}

table tr:nth-child(odd) {
  background-color: #DCDCDC;
}


/* Fixing margins for phone */
.tablePhoneFix {
        margin-left: 10px;
        display: flex;
        justify-content: center;
    }

/* ----------------------------- STYLING FOR TABLE END -------------------------------------- */











/* ----------------------------- STYLING FOR HERO IMAGE BANNER -------------------------------------- */
.back-test {
    height: 100vh;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(../images/heroImage.jpg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* ----------------------------- STYLING FOR HERO IMAGE BANNER END -------------------------------------- */











/*------------------------------------------- TABLE RESPONSIVENESS ----------------------------------------------*/
@media (max-width: 730px) {
    .tableContainer {
        display: flex;
        justify-content: center;
        flex-direction: column;
        width: 90%;
    }
    
    .tableContents {
        display: flex;
        justify-content: center;
        text-align: left;
        margin-top: 10px;
        margin-bottom: 20px;
        flex-direction: column;
        margin-left: 10px;
}

    .tableContents th {
        background-color: #1e90ff;
        color: white;
        border: 1px solid black;
        padding: 8px;
        padding-top: 12px;
        padding-bottom: 12px;
        font-size: 20px;
}


    .tableContents tr {
        background-color: #F0F8FF;
        color: black;
        border: 1px solid black;
        font-size: 15px;
    
}
    .tablePhoneFix {
        margin-top: 10px;
        margin-left: 0px;
        display: flex;
        justify-content: center;
    }
    
    .back-test {
        height: 200vh;
        background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(../images/heroImage.jpg);
        background-attachment: fixed;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
}

}
/*------------------------------------------- TABLE RESPONSIVENESS END ----------------------------------------------*/

_x000D_

<!DOCTYPE html>
<html>
<head>
    <!-- Meta Data *IGNORE* !-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="https://unpkg.com/[email protected]/dist/css/ionicons.min.css" rel="stylesheet">
    <link rel="stylesheet" href="css1/styler.css">
    <script src="javascript/script.js" defer></script>
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.3/css/all.css" integrity="sha384-SZXxX4whJ79/gErwcOYf+zWLeJdY/qpuqC4cAa9rOGUstPomtqpuNWT9wdPEn2fk" crossorigin="anonymous">
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
    
    <!-- Header !-->
    <header>
        <div style="background-color: #1E90FF;" class="container-fluid">
            <nav>
                <div class="menu-icons">
                    <i class="fas fa-bars"></i>
                </div>
                <a href="index.php" class="logo">
                    <img class="logo" src="images/logo_trans.png" alt="logo" style="height: 75px;">
                </a>
                <ul class="nav-list">
                    <!-- Normal listing buttons !-->
                    <li>
                        <a href="index.php">Home</a>
                    </li>
                    <li>
                        <a class="dropdown">Services
                            <i class="fas fa-sort-down"></i>
                        </a>
                        <!-- Drop Down List !-->
                        <ul id="drop-sub" class="sub-menu">
                            <li>
                                <a href="businessPrintingPage1.php">Business Printing</a>
                            </li>
                            <li>
                                <a href="canvasPrintingPage1.php">Canvas Printing</a>
                            </li>
                            <li>
                                <a href="embroideryPage1.php">Embroidery</a>
                            </li>
                            <li>
                                <a href="engravingPage1.php">Engraving</a>
                            </li>
                            <li>
                                <a href="signsPage1.php">Signs</a>
                            </li>
                            <li>
                                <a href="apperalPage1.php">Custom Apperal</a>
                            </li>
                        </ul>
                    </li>
                    <!-- Normal listing buttons !-->
                    <li>
                        <a href="Promotions.php">Promotions</a>
                    </li>

                    <li>
                        <a href="partners.php">Partners</a>
                    </li>

                    <li>
                        <a href="aboutUs.php">About Us</a>
                    </li>
                    
                    <li>
                        <a href="contactUs.php">Contact Us</a>
                    </li>
                    
                    
                    <!-- Cart !-->
                    <li class="move-right">
                        <img class="cart" style="float: right;" src="images/new_cart.png" alt="Cart">
                    </li>
                    
                
                </ul>
            </nav>
        </div>
    </header>
    <!-- Javascript for making a new navbar image for responsiveness !-->
    <script src="javascript/script.js"></script>
</head>
<body>

_x000D_

_x000D_

_x000D_

Answered By: Anonymous

Related Articles

  • After a little scroll, the sticky navbar just is not fixed…
  • Navbar not filling width of page when reduced to mobile view
  • How to implement a Navbar Dropdown Hover in Bootstrap v4?
  • Trying to keep dropdown menus flush to the edge of header…
  • What is the worst programming language you ever worked with?
  • Bootstrap 4: Multilevel Dropdown Inside Navigation
  • How to use Bootstrap-Vue with a custom navbar dropdown…
  • Align nav-items to right side in bootstrap-4
  • Hide one dropdown in side menu when another opens
  • in responsive menu it puts two links on the same line

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

Python recursive function, return in if statement

Next Post:

Pyspark transform key-value pairs into columns

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Get code errors & solutions at akashmittal.com
© 2022 Fix Code Error