The Bootstrap Navbar dropdown list appears cluttered on desktops but remains tidy on mobile devices

I am encountering an issue because I haven't studied much about the design aspect. I am currently using a template from w3layouts.com under the Education section, specifically the Tutoring Template. This template is based on Bootstrap.

The demo page that I have edited can be found here: Demo Page

I am utilizing the dropdown button feature of Bootstrap. When I check the dropdown button for Downloads on my laptop, it appears like this: https://i.sstatic.net/bMc5K.jpg

However, when I view the same page on my mobile device (adjusting the web browser size), it looks like this: https://i.sstatic.net/1Acba.jpg

As seen in the image above with the Desktop View, it appears cluttered... What should I do now? The code is provided below.

<div class="header" id="home">
    <nav class="navbar navbar-default">
        <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html"><img src="images/logo.png" alt="" /></a>
        </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">
                <li class="active"><a href="index.html" class="hvr-bounce-to-top">Home <span class="sr-only">(current)</span></a></li>

                  <!-- Issue Arises Here -->
                  <!-- Issue Arises Here -->
                  <!-- Issue Arises Here -->

                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Downloads <span class="caret"></span></a>
                  <ul class="dropdown-menu">                      
                    <li class="dropdown-header">Practical Files</li>
                    <li><a href="#">Selected Download</a></li>
                    <li><a href="#">List View Mode</a></li>
                    <li role="separator" class="divider"></li>
                    <li class="dropdown-header">Cover/Index Pages</li>
                    <li><a href="#">Front/Cover Pages</a></li>
                    <li><a href="#">Index Pages</a></li>
                    <li role="separator" class="divider"></li>
                    <li class="dropdown-header">Reports Format</li>
                    <li><a href="#">Major/Minor Format</a></li>
                    <li><a href="#">Industrial File Format</a></li>
                    <li class="dropdown-header">Reports Files</li>
                    <li><a href="#">Major/Minor Projects</a></li>
                    <li><a href="#">Industrial Training</a></li>
                  </ul>
                </li>

                <!-- Up to this Point -->
                <!-- Up to this Point -->
                <!-- Up to this Point Maybe -->

                <li><a href="about.html" class="hvr-bounce-to-top">About</a></li>
                <li><a href="services.html" class="hvr-bounce-to-top">Services</a></li>
                <li><a href="contact.html" class="hvr-bounce-to-top">Contact</a></li>
            </ul>
            <div class="clearfix"></div>
        </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
</div>

If you require any other codes or the full code, please inform me. I have attempted to add and remove codes in the HTML but it only makes it messier...

Answer №1

modify

.menu-items li {
    width: 25%;
    float: left;
}

into

.menu-items> li {
    width: 25%;
    float: left;
}

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

The ng-controller directive is not functioning accurately

I attempted to execute the following basic HTML: <!DOCTYPE html> <html ng-app="tempApp"> <head> <script src="js_libs/angular/angular.min.js"></script> <script src="js_libs/angular/bootstrap.js"></script&g ...

Divide information in the chart

<table id="tab"> <tr><td class="sub">mmmmm</td><td class="sub">jjjjj</td></tr> <tr><td class="sub">lllll</td><td class="sub">wwwww&l ...

Reloading the ASP.NET MVC bootstrap modal using Ajax for a fresh look

I'm struggling with my bootstrap modal. Whenever I click the submit button, the page refreshes and the modal disappears. How can I keep the modal open after clicking the submit button to display either a success or error message? I am new to MVC and h ...

Update specific records seamlessly on my website without requiring the entire page to refresh

Is there a way to update a record without refreshing the page? I have a system where I need to toggle a feature on or off by changing its status between 0 and 1. Here is the form that allows me to do this: <table class="tablesorter" cellspacing="0"> ...

Struggling to eliminate excess white space on my site

I am in the process of creating a website using react-bootstrap. However, I have encountered an issue where there is excessive white space on the right side of the website. It seems that the default width of my website has expanded unintentionally. Current ...

The html input box's ability to handle overflow situations

Currently, I am working on creating a form that allows users to update data. <dl> <dt>Medical Needs:</dt> <dd class="med_needs" style="height:60px;overflow:auto"> <input type = "text" id="med_needs"name ="med_nee ...

Function fails to execute after drop-down menu selection

I set up a double drop-down feature and implemented my function calling code. However, after choosing an option from the drop-down menus, the function is not getting executed. The purpose of the code is to trigger a specific function based on the selectio ...

Tips for implementing filters on `<span>` elements

When I transition from Spring to UI, I encounter the following code: <span th:text="${fromController.number}"/> The "number" mentioned here is a double retrieved from the database. I am looking to filter values into three categories: 0 to 30, 30 to ...

Transferring data from an Excel spreadsheet into a structured table

I am interested in transferring specific columns of data from an excel sheet to an HTML table. My goal is to populate the table based on certain conditions rather than statically inputting fixed cells. For instance, if my excel sheet has columns for Name ...

Trouble with using $.ajax to call a PHP function

Hey everyone, I hate to ask for help but I'm really stuck on this issue. I've tried everything and followed all the scenarios on this site, but I just can't seem to get it working. I even added alerts and echoes, but the function doesn' ...

Using a DIV to contain a FileUpload Control in an ASPX page

Scenario: I have an ASPX page (Page A) without a form element, which contains a DIV displaying another ASPX page (Page B) with a FileUpload Control inside a form element. Requirement: Submit the form to upload the file without refreshing or navigating awa ...

Textbox textchange event triggers Javascript function when Checked=True

$('.LblQTY').on('input', function () { var currentRow = $(this).closest('tr'); var rate = parseFloat(currentRow.find('.LblRate').text()); var quantity = parseFloat($(this).val() == '' ? '0& ...

JavaScript classList.remove function experiencing inconsistencies

Take a look at this fiddle: JSFiddle The HTML code: <table class="myTable"> <tr> <th>Some text</th> <td class="align"> <span class=" someStyle">1</span>/<span class="otherStyle">15</span& ...

Retrieve a collection of CSS classes from a StyleSheet by utilizing javascript/jQuery

Similar Question: Is there a way to determine if a CSS class exists using Javascript? I'm wondering if it's possible to check for the presence of a class called 'some-class-name' in CSS. For instance, consider this CSS snippet: & ...

Exploring the depths of deep linking with jQuery Address

Trying to implement the jQuery address plugin for deep linking on my ajax website has been challenging. I'm struggling to grasp how to configure it properly. The provided examples aren't making it any clearer either. Can someone please share a ...

How to dynamically change the class of an element that contains other elements using JavaScript and JQuery

I have created a blog archive with the following format: +Year +Month Title Here is a snippet of the code: <ul> <span class="toggle">+</span> <li class="year">$year <ul> <span ...

exciting, showcasing a dependency map using svg within an html5 environment

I am working on creating a polygon background for my menu, which needs to be responsive in design. Here is an example of what I am trying to achieve: example image. Should I use JavaScript to listen for size changes and adjust the points for the polygon e ...

Excessive Recursion Error Caused by JQuery

Can anyone assist me with this issue? Here is the code I am using: <script> $(document).ready(function() { spectrum(); function spectrum(){ $('#bottom-menu ul li.colored a').animate( { color: '#E7294F' }, 16000); spect ...

Experiencing erratic outcomes with window.innerWidth in Mobile Safari

I am currently using JavaScript to determine the width of the browser: $(document).ready(function(){ var width = window.innerWidth; }); However, it seems that this method is producing inconsistent results. To showcase the issue, I have created a fun ...

The words overlaid on the image spill out beyond its edges

I want to create a design where the text flows outside of the image and continues into another container. After some trial and error, I managed to achieve a layout where the text seamlessly extends beyond the image and into a separate section. Ideally, the ...