The mobile view does not allow scrolling in the dropdown menu

I recently created a webpage using Bootstrap 4 beta with a dropdown menu in the navbar. While it displays perfectly on my laptop in fullscreen mode, there seems to be an issue when viewed on my iPhone. The dropdown menu only shows 7 out of the 9 links. Is this a problem with Bootstrap itself or is there a way for me to address this? I've included relevant HTML code here, omitting unrelated sections. Here is a link to the https://i.sstatic.net/vFTcm.png

/* Navbar */

#primary-navbar {
  background: #CDEBED;
  margin-bottom: 0;
}
/* we overwrite the default navbar style from Bootstrap */
nav.navbar {
  background: #CDEBED;
  font-size:18px;
  border: 0;
  border-radius: 0;
  margin-bottom: 0;
  min-height: 34px;
  white-space: nowrap;
}
/* The toggle unit (there is more stuff in there..) */
.navbar-header .navbar-toggle {
  border: 0;
}
.navbar-header .navbar-toggle span.icon-bar {
  background: #004289;
}
.navbar-header .navbar-toggle:hover span.icon-bar {
  background: #004289;
}
/* The Logo/Start Button on mobile devices */
a.navbar-brand:link,
a.navbar-brand:visited {
  color: #004289;
  text-decoration: none;
   background-color: #fff; 
   border-radius: 50%; padding: .5rem;
}
a.navbar-brand:hover,
a.navbar-brand:focus {
  color: #ff0000;
  text-decoration: none;
}
/* First Level Main nav */
ul.nav {
  /* Menu style */
}
ul.nav li.active {
  background: #004289;
  text-decoration: none;
}
ul.nav li.active a:link,
ul.nav li.active a:visited {
  color: #004289;
  text-decoration: none;
}
ul.nav li a:link,
ul.nav li a:visited {
  color: #004289;
  text-decoration: none;
}
ul.nav li a:hover,
ul.nav li a:focus {
  color: #fff;
}
/* Our resposive dropdown */
ul.dropdown-menu {
  border-radius: 0;
  background: #CDEBED;
  width: 100%;
  margin: 0;
}
ul.dropdown-menu li a:link,
ul.dropdown-menu li a:visited {
  color: #004289;
  padding: 5px 15px;
  text-decoration: none;
}
ul.dropdown-menu li a:hover,
ul.dropdown-menu li a:focus {
  color: #fff;
  text-decoration: none;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu>.dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    -webkit-border-radius: 0 6px 6px 6px;
    -moz-border-radius: 0 6px 6px;
    border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover>.dropdown-menu {
    display: block;
}

.dropdown-submenu>a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #CDEBED;
    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu:hover>a:after {
    border-left-color: #fff;
    text-decoration: none;
}

.dropdown-submenu.pull-left {
    float: none;
}

.dropdown-submenu.pull-left>.dropdown-menu {
    left: -100%;
    margin-left: 10px;
    -webkit-border-radius: 6px 0 6px 6px;
    -moz-border-radius: 6px 0 6px 6px;
    border-radius: 6px 0 6px 6px;
}
.dropdown:hover .dropdown-menu {
    display: block;
 }
@media (min-width:769px) {
.dropdown:hover .dropdown-menu {
display: block;
}
}
/* Links */

a {
  color: #036;
  text-decoration: none;
}
   

a:hover,
a:focus {
  color: #036;
  text-decoration: none;
}


.navbar-right li {     display: inline-block; }

a {
  color: #036;
  text-decoration: none;

  &:hover {
    color: #fff;
    text-decoration: none;
  }

}

@media (min-width: 992px) {
   .equal{  
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8>
...
</body>
</html>

Answer №1

Your navigation bar is set to a fixed position and the height is not restricted - this should solve the issue!

@media (max-width: 767px){
  nav.navbar{
   max-height: 100vh;
   overflow: auto;
  -webkit-overflow-scrolling: touch;
  }
}

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

What is causing my HTML file path to function on my server, but not when I access the HTML file directly?

My file structure is organized as follows: The main file is located in the folder "HTML-Project/index.html". Within this folder, I have my style.css file and two other folders: one for pictures (HTML-Project/pictures) and another for categories (HTML-Proje ...

When selecting a new tab in HTML, the current page position remains unchanged. However, I would like the page to automatically scroll to the

In the design of my website, I have incorporated buttons that are linked to various pages using navigation tabs. However, when these buttons are clicked, the view maintains its position on the new page (e.g., halfway scrolled through the page). Instead o ...

Having trouble reaching the upload file in PHP

I am attempting to transfer files to a remote server using JavaScript, with PHP as the backend. The JavaScript code seems to be functioning properly, but on the PHP side, the $_FILES and $_POST arrays are empty. However, the $_SERVER array contains some da ...

What could be causing the border around my three.js canvas?

I'm utilizing a version of this code on my website and I have customized it to have a transparent background with only particles visible on the webpage. However, I've noticed a thin border around the canvas where these particles are displayed, ap ...

Select Year - Calendar View

I am currently making adjustments to a basic datepicker. I am looking to only include the Year dropdown (Month is not necessary). https://i.sstatic.net/AEpaj.png I have attempted to eliminate the Month dropdown by applying the following CSS: select.cus ...

What is the best way to ensure that the drop shadow on the bootstrap carousel is not confined by the parent element?

I'm currently using bootstrap's carousel to display items, and I've noticed that the box-shadow attribute on my item blocks is being limited by the parent element that wraps it. https://i.sstatic.net/ks5lC.png Is there a way for me to ensu ...

Enhance the design of a div with a stylish border using CSS

Thank you very much for your help, I am looking to design a progress div with borders using HTML and CSS. The design should resemble the image provided, but with rounded corners. https://i.sstatic.net/6HMGS.png ...

Error: controller undefined

As I delve into a Coursera course on AngularJS, I've encountered a perplexing issue with a controller. The console is indicating that it is not defined. Upon running it through the https://validator.w3.org/, a recurring error message mentioning that ...

Manipulating certain attributes of a CSS class for a specific division element

I'm working with a div that has a CSS class applied to it. The class declares the height as x pixels, but I actually want my div to be y pixels high. Is there a way to override the height parameter of the CSS without making changes to the CSS file? ...

What is the best way to add hyphens between words in PHP code?

Here is the code snippet and the desired output: ('nice apple'),(' nice yellow banana'),(' good berry ') To achieve the desired output: ('nice-apple'),(' nice-yellow-banana'),(' good-berry ') ...

How to submit a textarea with the enter key without needing to refresh the page

I'm attempting to handle the submission of a textarea when the user hits the enter key, storing the text in a variable, then swapping out the form with the text and adding a new form at the end, all without refreshing. I had success doing this with an ...

What is the best way to access dropdown sub-menu options from a complex multi-level navigation bar

Struggling to figure out how to open my dropdown sub-menu using CSS. Hoping to make it so the user can open it by hovering over the corresponding tag. I attempted to use #lablinksDD to trigger the opening of #ddSbMenu when hovered over #menuDD with #labLin ...

What is the best way to update information within a <tbody> tag?

Can someone assist me with replacing content in an HTML table? Please review my code below: <html> <head> <script type="text/javascript"> function changeRows() { var htmlString="<tr><td>bhanu</td><t ...

Is it possible to maintain a div consistently visible at the top while scrolling using CSS?

Is there a way to ensure that a div remains visible at the top of the page when scrolling without using jQuery, but only using CSS? ...

What is the best way to replicate touch functionality on mobile browsers for both Android and iPhone devices?

Recently, while developing a web application, I ran into an issue on mobile browsers where the :active pseudo class wasn't functioning properly. I am currently utilizing CSS sprites and looking for guidance on how to simulate clicks for mobile browser ...

Unable to update meta tags in index.html on GitHub Pages using create-react-app (CRA)

When using GitHub Pages, it overrides my create-react-app's index.html with its own file. The original index.html includes important meta tags, but GitHub's version does not. Unfortunately, I am unable to modify the metadata of GitHub's in ...

How to style the background color of the selected option in a <select> element using

Is there a specific style I can use to change the color of a selected option in a dropdown menu? For example: <HTML> <BODY> <FORM NAME="form1"> <SELECT NAME="mySelect" SIZE="7" style="background-color:red;"> <OPTION>Test 1 &l ...

What steps can I take to make my animation work in the opposite direction as well?

I'm currently working with an angular slider that is set to TRUE/OPEN by default. The issue I am facing is that while I am able to slide it using angular animations in one direction, I am unable to see the transition when sliding it back. Any assistan ...

My AngularJs code seems to be throwing some errors

I recently started learning Angularjs and here is the code I have written: <!DOCTYPE html> <html> <head> <title>ng-Messages Service</title> <script src='https://ajax.googleapis.com/ajax/libs/jquery ...

Adding Bootstrap to your React application is a great way to easily style your components and make them

I was wondering if you could provide some guidance on incorporating Bootstrap into a React application. Since we can't use CDN links and the "class" attribute in a React app, could you please explain how to add and utilize Bootstrap components within ...