Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

Navbar Niggles

Edrol97

Silver Coder
Hi all, I have a weird scroll effect on my navbar for this page and I'm wondering why it's the case. It's only a tiny scroll, but looks like the following. I'm attaching the relevant html and css, and also a YouTube video showing the problem (here)
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

HTML:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta http-equiv="refresh" content="404.html" />
    <meta
      name="viewport"
      content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
    />
    <title>Shop Skłep Boutique | Eliot Lord</title>
    <link
      rel="icon"
      type="image/x-icon"
      href="img/background/GBBluesFavicon.png"
    />
    <link rel="stylesheet" href="mainstyle.css" />
    <link rel="stylesheet" href="shop.css" />
    <link rel="icon" type="image/x-icon" href="img/background/" />
    <span id="loader">Loading...</span>
    <script>
      window.onload = () => document.querySelector("#loader").remove();
    </script>
  </head>
  <body>
    <div class="navbar-master">
      <div class="navbar">
        <img
          draggable="false"
          src="img/background/sigh%20news%20logo.png"
          width="30%"/> <br>
        <a href="Hi.html">HI</a> <a href="about_me.html">BIO</a
        ><a href="Art.html">SHOW-OFF</a> <a href="cv.html">CV</a>
        <a href="Inspa.html">INSPA</a>
        <a href="Games.html">PLAY</a>
        <a class="activelinknav" href="Shop.html">SHOP</a>
      </div>
    </div>

CSS:
.navbar {
  font-size: 3dvw;
  background: linear-gradient(to bottom right, #0000, #292929, #2d2d2d);
  font-family: "Tahoma";
  height: auto;
  overflow: auto;
}

.navbar-master {
  background-color: #6c6c6c;
}
.navbar a {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2.6dvw;
  font-weight: 900;
  color: white;
  padding: 10px;
  text-decoration: none;
  cursor: url("img/background/cursors/pointer1.png");
  text-align: center;
}
.activelinknav {
  background-image: url(img/background/Underline%20White.png);
  background-repeat: no-repeat;
  background-size: 100% 20%;
  background-position: 0px 85%;
}
a:hover,
img[onClick],
div[onclick] {
  cursor: url("img/background/cursors/pointer1.png"),
    url("img/background/cursors/Mouse%20cursor.png"),
    url("img/background/cursors/Finger%20cursor.png"), pointer;
}
 
Last edited by a moderator:
Solution
Something is obviously taking up more space then you are allowing for. Margins might be peeking out of container heights, etc. Your overflow:auto is allowing that to scroll (I assume) to accommodate the additional height needed by the content. You can track down the culprit with the inspector or try using overflow:hidden as a hack stop gap. A link to the page for us to inspect it would be the next step if you are still having issues.
Something is obviously taking up more space then you are allowing for. Margins might be peeking out of container heights, etc. Your overflow:auto is allowing that to scroll (I assume) to accommodate the additional height needed by the content. You can track down the culprit with the inspector or try using overflow:hidden as a hack stop gap. A link to the page for us to inspect it would be the next step if you are still having issues.
 
Solution
Something is obviously taking up more space then you are allowing for. Margins might be peeking out of container heights, etc. Your overflow:auto is allowing that to scroll (I assume) to accommodate the additional height needed by the content. You can track down the culprit with the inspector or try using overflow:hidden as a hack stop gap. A link to the page for us to inspect it would be the next step if you are still having issues.
Thanks Tom, using overflow:hidden worked brilliantly.
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom