The Bootstrap navbar appears to extend beyond the content on the page

I am new to using Bootstrap. I have encountered an issue with the navbar on my website. The navbar appears to be longer than the screen size and the right button is being overlapped by the right side of the window. Unfortunately, I am unable to scroll the webpage to the right in order to see the entire navbar. This problem only recently appeared, as it used to display correctly. Here is how it currently looks:

https://i.sstatic.net/gj4ac.png

.navbar {
  padding-top: 6px;
  padding-bottom: 4px;
  box-shadow: 0px 1px 5px gray;
  background-color: rgba(244, 139, 139, 0.8);
}
.nav.navbar-nav.navbar-right a {
  margin-right: 2px;
  color: white;
  font-size: 30px;
  font-family: Phenomena-Bold;
}
.navbar-collapse .navbar-nav > li > a:hover {
  color: #3b3c3d;
}
.navbar-collapse .navbar-nav > li > a:active {
  color: #3b3c3d;
}
span.glyphicon-user {
  font-size: 20px;
}
span.glyphicon-shopping-cart {
  font-size: 20px;
}
.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background-color: white
  /* change this to any color you want! */
  ;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<nav class="navbar navbar-light container-fluid navbar-fixed-top" role="navigation">
  <div class="row">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav nav-pills navbar-right">
        <li role="presentation"><a class="page-scroll" href="#">1</a>
        </li>
        <li role="presentation"><a class="page-scroll" href="#">2</a>
        </li>
        <li role="presentation"><a class="page-scroll" href="#">3</a>
        </li>
        <li role="presentation"><a class="page-scroll" href="#">4</a>
        </li>
        <li role="presentation"><a class="page-scroll" href="#"><span class="glyphicon glyphicon-user"></span></a>
        </li>
        <li role="presentation"><a class="page-scroll" href="#"><span class="glyphicon glyphicon-shopping-cart"></span></a>
        </li>
      </ul>
    </div>
    <!-- /.navbar-collapse -->
  </div>

Answer №1

            <div class="wrapper">
                <div class="header">
                    <button type="button" class="menu-toggle" data-toggle="collapse" data-target="#menu">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="line"></span>
                        <span class="line"></span>
                        <span class="line"></span>
                    </button>
                </div>

                <!-- Menu items -->
                <div class="collapse menu" id="menu">
                    <ul class="nav-menu">
                        <li role="menuitem"><a class="link" href="#">Home</a></li>
                        <li role="menuitem"><a class="link" href="#">About</a></li>
                        <li role="menuitem"><a class="link" href="#">Services</a></li>
                        <li role="menuitem"><a class="link" href="#">Contact</a></li>
                        <li role="menuitem"><a class="link" href="#"><span class="icon-user"></span></a></li>
                        <li role="menuitem"><a class="link" href="#"><span class="icon-cart"></span></a></li>
                    </ul>
                </div><!-- /.menu -->
        </div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I'm encountering difficulties implementing anchor tags within my single-page application

Currently, I am in the process of learning how to create single page applications with AngularJS using the ui-router module. However, I have encountered an issue where the anchor tag on my main HTML page is not functioning correctly. I am now at a standsti ...

Attempting to create a single function that can be utilized with numerous divs that share the same class in jQuery

Currently, I am working on creating a basic jquery gallery viewer. In my code, I have the following structure: <div class="photoset"> <img /> <img /> </div> <div class="photoset"> <img /> <img /> <i ...

adjust bootstrap column width to fill the container

https://i.stack.imgur.com/tCuL6.png I am hoping that this image will provide a visual aid for what I am trying to convey. My goal is to have the arrow and the boxes aligned in a row without any empty space on the right side. As you can see, the leftmost b ...

Adding LocalStorage functionality to buttons in order to switch colors can be done by storing the

I've run into an issue trying to incorporate LocalStorage with the buttons that change colors as themes in JavaScript. I'm new to coding and eager to add this feature to my personal blog. $(document).ready(function () { $(".header--theme-button ...

Update to the viewport meta tag in iOS 7

Anyone experiencing problems with the viewport tag after updating to iOS7? I've noticed a white margin on the right side of some sites. Adjusting the initial scale to 0.1 fixed it for iPhone but made it tiny on iPad 3, which is expected due to the low ...

Is it possible to obscure the PHP file path and conceal the parameters in a POST request?

Is there a way to securely increase the liking number on records in a database without exposing sensitive information through post requests? The PHP file and GET parameters are visible in the post request, allowing anyone viewing the page source to poten ...

Conceal DIV containers during the loading of the page, and reveal them only upon the selection of Radio Buttons

In my user interface, I have implemented three radio buttons labeled as "Easy," "Medium," and "Hard." Each button is assigned to a distinct Javascript function that manipulates the visibility of corresponding div elements. The main purpose behind this setu ...

How to Disable Ellipses in HTML Select on iPhones?

When using a select box with long options on mobile, the text gets cutoff with an ellipsis. This can cause confusion for users as the full text is not visible. I'm looking for a solution to either show the full text or make it wrap instead of cutting ...

Transferring MySQL information to web pages using hyperlinks within a table

We have encountered a challenge while working on our game shop website, specifically related to the purchase link. The link is displayed within a mysql table and currently directs users to the same page. Our goal is to optimize efficiency by adding new gam ...

What is the process for placing a component on the right side of the sidebar?

Here is the code snippet I am working with: <template> <div class="main"> <sidebar /> <router-view /> </div> </template> The sidebar has a width of 260px. I need to ensure that any comp ...

Create a new Chart.js Chart by using the data retrieved from an AJAX request and encoded in JSON

I am currently working on drawing a chart using the chart.js library. The initial draw works perfectly fine, but I am facing issues when trying to redraw the doughnut chart with new data retrieved from an ajax call. My approach involves PHP and Codeignite ...

"Revamp your shopping experience by customizing your product selections with the new TM

I am attempting to create a jQuery script that will modify the quantity in WooCommerce. Here is the resulting HTML code. <div class="tc-cell tc-col"> <div class="tc-row"><div data-uniqid="5ecbf5c6c44cd8.41160631" data-logic="" ...

Does embedding an Iframe for external files from your server enhance the loading speed of the current page compared to directly loading it on the page?

I'm facing an issue with the loading time of a Facebook post on my webpage index.php. The current method of using the embedded post provided by Facebook is taking too long to load. My solution is to create a separate page, post.php, where only the Fac ...

Issue with Angular ui-select causing repeated $http requests in ui-select-choices

I'm currently working on integrating ui-select into my project, and this time I need to pass a controller function as options to ui-select-choices. Here's how it's set up: HTML: <ui-select ng-model="selectedItem" theme="selectize" ng-di ...

Utilize jQuery's .append() function to dynamically insert content into your webpage

I currently have tab elements set up like this: <div class="tab-pane fade active in" id="tab-a"> </div> To populate the content of that tab with a JavaScript string array, I am using the following code snippet: var full_list = ""; for (var ...

Update the div element without needing to reload the entire page

Is there a way to reload a div tag without refreshing the entire page? I understand this question has been asked before, but I want to make sure I have a clear understanding. <p>click HERE</p> <div class="sample"> <?php functi ...

Nesting maps in JavaScript is a powerful way to transform

I'm in the process of developing a budgeting app using React and JavaScript. At the moment, I have successfully generated a table displaying various costs. Name Budget Used $ Used % Available Food 300 300 100 0 Streaming services 600 600 100 ...

The hyperlink function is not operational in Gmail attachments

Using an anchor tag to navigate to a specific section within the same page works perfectly when the HTML file is on my local machine. However, when I attach the file in Gmail and open the attachment, it doesn't work. Why is this happening? How can I m ...

The Google Maps API is not providing any data in response to my jQuery JSONP request

Similar Topic: Unpacking Google Geo API (Reverse Geocoding) using jQuery $(window).load(function() { var purl = "http://maps.googleapis.com/maps/api/geocode/json?latlng=32.759294499999996,-97.32799089999999&sensor=false"; $.getJSON(purl,f ...

Silhouette as the backdrop image

There is a span element that I am using in the following way - <span class="tick"></span> This creates a decorative "tick" for a checkbox. The CSS code used for this is - input[type="checkbox"] + span > span.tick { display: block; ...