Bootstrap 4 collapsible menu "drop-down" feature exclusively for mobile users

On my website, I have a simple navigation bar located at the top with just two links. However, when the view switches to mobile (tablet and/or smartphone), these links disappear and are replaced by a "hamburger" menu icon. The issue arises when I click on this icon, nothing happens. I want both of my links to be visible when I click on the menu icon.

https://i.sstatic.net/PmTGT.png https://i.sstatic.net/v6gvI.png

/* Registration Navbar */

.registration-navbar {
  background-color: #8ABE57;
  height: 45px;
}

.registration-navbar ul li a {
  color: #ffffff;
  font-size: 0.8em;
}

.registration-navbar ul li a:hover {
  color: #31353D;
}

.navbar-dark,
.navbar-toggler {
  border: none;
  color: rgba(255, 255, 255, 0);
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

<nav class="navbar navbar-expand-lg navbar-dark registration-navbar">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                  <span class="navbar-toggler-icon"></span>
                </button>
  <div class="collapse navbar-collapse my-auto" id="navbarNav">
    <ul class="navbar-nav ml-auto">
      <li class="nav-item active">
        <a class="nav-link" href="#">Mi Cuenta</a>
      </li>
      <li class="nav-item active">
        <a class="nav-link" href="#">Registrarme</a>
      </li>
    </ul>
  </div>
</nav>

Answer №1

To fix the issue, simply remove the line height: 45px from the .registration-navbar CSS class.

/* Custom Styling for Registration Navbar */

.registration-navbar {
  background-color: #8ABE57;
}

.registration-navbar ul li a {
  color: #ffffff;
  font-size: 0.8em;
}

.registration-navbar ul li a:hover {
  color: #31353D;
}

.navbar-dark,
.navbar-toggler {
  border: none;
  color: rgba(255, 255, 255, 0);
}

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

A step-by-step guide to horizontally aligning Bootstrap cards using PHP

I seem to be facing an issue with fetching data from my MySQL database. My frontend is built using Bootstrap and I am trying to display the fetched cards in a horizontal layout with the code snippet below: <?php require 'config.php'; ...

Mobile site's call button functionality is malfunctioning

For the telephone number on my mobile site, I employed the <a href="tel:+1800229933">Call us free!</a> code. However, it seems to be malfunctioning on several devices. Any insight on this issue would be greatly appreciated. Thank you. ...

Transform this background into a transparent one, then ensure it becomes visible and remains that way

Here's what I've been working on: My HTML code: <div id="smith"> <img class="top" src="http://i.imgur.com/D6Kohra.png"/> </div> And the CSS for it: #smith { background: url("http://i.imgur.com/1ABXZ1y.png") no-repeat ...

Adjusting the Size and Spacing of Vuetify's Buttons

Why are buttons extending beyond the card width? https://i.stack.imgur.com/wVRoQ.png I'm facing difficulties customizing the buttons within the cards. I want to eliminate all padding so that the black border perfectly encloses the icon without any un ...

Make the image responsive by aligning the right side accordingly

I am working on making an image responsive using HTML and CSS. My goal is to have the right side of the image crop as the screen size decreases to maintain the height and position of the image, similar to Nike's hero image. I want to keep the white sp ...

Using the -webkit-box-reflect property along with the CSS position:absolute styling

Running on the Chrome Canary build, I have come across this HTML code snippet: <div id="debug" class="debug" >TEST</div> Additionally, here is the CSS code snippet: -webkit-box-reflect: below 0px -webkit-gradient(linear, ...

Tips for aligning an image within a div, using a specific aspect ratio, while maintaining the original height and width

Apologies for the confusing title, but I'm struggling to find the right words to explain my issue. How can I properly fit my image labeled as "carouselMap" within the div named "carouselItem" while maintaining an aspect ratio of 2 ...

What are the advantages of using the Php include function and the Jquery load function

I currently have 3 distinct folders in my directory: Admin Home Profile Each of these folders contains various css, js, and php files, each consisting of more than 1000 lines. This structure was implemented to keep the files organized and manageable. R ...

What are some solutions for adjusting this sidebar for mobile devices?

My mobile version sidebar is not functioning properly on my website. To see the issue, you can visit Zinexium. As I am new to HTML, I don't know how to fix it. Here is a link to the code. Thank you! <!DOCTYPE html> // Code snip ...

Utilizing SASS with Bootstrap 4 media breakpoints: A comprehensive guide

According to the information provided on the official Bootstrap website: Bootstrap writes its source CSS in Sass, making all media queries available via Sass mixins: @include media-breakpoint-up(xs) { ... } @include media-breakpoint-up(sm) { ... } @in ...

Enhancing text with custom gradient using CSS styling

I am facing an issue where uploading an image with text is not helpful for Google search visibility. I am looking to add a specific gradient style to my text. Could anyone assist me in achieving this particular text look that I have in mind? I came acros ...

"Using Bootstrap to specifically align a grid of images in the center on any screen size

I'm currently utilizing bootstrap to center a group of social icons beneath an h1 text on all screen sizes. While I've managed to achieve this, there are two specific sizes where the alignment seems to be off. Here's a snapshot showing a sl ...

Issues with the plugin for resizing text to fit the parent div's scale

I've spent the last hour attempting to get this script to function properly, but no luck yet. Check out the correct jsfiddle example here: http://jsfiddle.net/zachleat/WzN6d/ My website where the malfunctioning code resides can be found here: I&apo ...

What is the process for adding a multi-carousel item slider in Laravel?

How can I implement a multi-carousel item slider in Laravel? I attempted to modify my code based on the solution for creating a dynamic carousel in PHP Laravel that only displays four images, but unfortunately, it didn't yield the desired results. ...

Leveraging media selectors to enhance Bootstrap SASS classes

When working on a Bootstrap/SASS (SCSS) site, I wanted to transform a Bootstrap button group (.btn-group) into a vertical group (.btn-group-vertical) using media selectors instead of JavaScript. However, the issue with @extend not functioning inside a medi ...

Unable to see html5 canvas content when accessing from localhost

I am having an issue with displaying code in an HTML file. When I try to view the code on localhost using MAMP, all I see is a black canvas area with a border around it. I have checked it in both Chrome and Firefox, but I keep getting the same results. Can ...

The right-aligned navigation bar elegantly shifts downward when it exceeds the screen width

I've been struggling to create a Right Aligned Navigation Bar with a search bar and a login icon that stay in one row on the page. No matter how I try, it keeps jumping down instead of aligning properly. Here is an image of what I'm trying to ach ...

Problem with CSS: The background image is not showing up in Google Chrome, causing the drop-down list to display incorrectly

I have a developed application that needs to function properly on all browsers, with special emphasis on Chrome. Within the application, there is a dropdown list styled using the CSS below: .ddlStyle{ background-image: url("../Images/navigation_bg.jpg ...

In order to effectively utilize and display images on a webpage, I require a JavaScript array to store image links for use as image sources

I need assistance with changing these images. I am trying to store their links in an array, but when I click the button to change the image, it does not recognize that the array variable points to an image. Can someone offer guidance? Here is my current ...

Expanding radio button toggles with the power of Bootstrap 4

I'm currently using Bootstrap 4 to design a form where different elements expand when each "button" is clicked. Here's how it should function: Buttons(radio): YES / NO --- If "YES" is selected, then an element containing checkbox buttons will ex ...