Trouble making the navigation bar shrink together with the window
15:44 22 Nov 2025

I am making a small site for my neocity, but I have trouble making the items in the navbar not overflow the borders of it when I shrink the window.enter image description here



  
    
    
    The web site of mozzarellasoundwave
    
  
  
    
WELCOME TO THE WORLD OF MY RAMBLES

Transformers

text

Transformers

text

To learn more HTML/CSS, check out these tutorials!

@font-face {
  font-family: WelcomeFont;
  src: url(basheq-vintage-font/BasheqVintageDemoVersionRegular-gwpmE.otf);
}

body {
  background-image: url(neocityBG2.jpg);
  color: white;
  font-family: Verdana;
  margin: 0;
}

/* ---------------- Banner ---------------- */

#containerBanner {
  position: relative;
  text-align: center;
}

.Banner {
  width: 60%;
  height: 300px;
  border-radius: 1rem;
  margin: 3rem auto 0;
  display: block;
}

.welcome {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 250%;
  font-family: WelcomeFont;
  font-weight: bold;
  text-shadow: 5px 5px rgb(92, 43, 137);
}



/* ---------------- NavBar ---------------- */

#navbar {
  background-color: rgba(130, 96, 162, 0.542);
  width: 60%;
  margin: 1rem auto;
  text-align: center;
  border: 5px solid rgb(92, 43, 137);
  border-radius: 1rem;
  padding: 1rem 0;
}

/* dugmići u navbar */
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

#navbar ul {
  justify-content: space-evenly;
}

#navbar li a {
  min-width: 500px;
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: 80%;
  padding: 14px 16px;
}

#navbar li a:hover {  
  background-color: rgb(188, 160, 215);
  border-radius: 0.5rem;
}

/* ---------------- Text ---------------- */

#container {
  background-color: rgb(188, 160, 215);
  border-radius: 1rem;
  width: 60%;
  margin: 2rem auto;
  padding: 1rem;
}

#container2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2vw;
  max-width: 900px;
  margin: auto;
}

.Tran-anime {
  background-color: rgb(92, 43, 137);
  padding: 2rem;
  text-align: center;
  border-radius: 1rem;
  color: white;
  width: 100%;
  max-width: 420px;
}

I have tried looking at W3Schools tutorials more closely, even looked at codes of other people on neocity, I haven't figured out what is wrong with my code or what it lacks so I can have a nice looking page in all winow formats.

html css uinavigationbar