Create a customized navigation bar using Bootstrap 5 with double rows

I am trying to create a fixed navbar at the top with two rows instead of just one. The code I currently have is as follows:

<nav class="navbar navbar-expand-md navbar-dark fixed-top red-900 bg-light">
    <div class="container-fluid">
        <a class="navbar-brand" href="#">Fixed Navbar</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarCollapse">
            <ul class="navbar-nav me-auto mb-2 mb-md-0">
                <li class="nav-item">
                    <a class="nav-link active" aria-current="page" href="#">Home</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Link</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

The current result can be seen here.

Now, I would like to create two red rows. Is there a simple way to achieve this?

Answer №1

In my opinion, incorporating an additional <nav>.....</nav> after the initial one could be beneficial. For more information on this technique, you can refer to a solution provided here.

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 the best way to position my logo on top of the stunning space background?

Click here to check out the code on CodePen Please take a look at my code on codepen.io. I am new to Stack Overflow so please be patient with me if I make any mistakes. ;-; I currently have my logo (https://i.stack.imgur.com/W0nWc.png) included in the co ...

How to eliminate a line break following an image tag in HTML

Before I display my image with an H3 tag, I didn't use any break statements. However, the two tags are appearing on separate lines when I view it in the browser. Is there a CSS trick I can use to solve this issue, or perhaps an easier tag attribute th ...

Looking for guidance on seamlessly incorporating a WrapBootstrap theme into your Node.js Express.js application?

Recently, I acquired this template: This is the Base Admin 3.0 template that I have bought. I am looking to implement it into a nodejs/expressjs application. However, I am facing some challenges, especially: The Jade installation seems to be causing ...

outputting mysql information onto an HTML webpage using socket.io and node.js

Currently, I am experimenting with printing MySQL data to an HTML page as a way to practice and enhance my learning. Updated Code Below is the snippet from my server.js file var mysql = require("mysql"); var app = require('express')(); var htt ...

Extract JSON data from an API using PHP and then convert it into HTML format using Javascript

I'm brand new to the world of coding. Currently, I am utilizing PHP to fetch a JSON response from an API. Within this JSON data are Titles and corresponding URLs to various web pages. A snippet of the JSON response can be found at the conclusion of t ...

Troubleshooting inactive CSS hover animation

Greetings! I'm facing an issue with a CSS hover animation. Here are two demos I've created: In the first DEMO, the animation works perfectly. However, in the second DEMO, it doesn't seem to be functioning. On the second demo, there are two ...

Discovering a sophisticated way to locate a span element using the not(p) selector in Selenium

Within a span element with an ID, there is a mixture of text and a paragraph tag. The goal is to use selenium webdriver to pinpoint the street address in the mix below: <span id="myspan"> <p>fullname</p> street address - has no ...

The issue of border-radius and shadow box inconsistency

I'm trying to style a div with the following properties: .example { margin: 200px; width: 200px; height: 200px; border-radius: 20px; box-shadow: white 0px 0px 0pt 8pt, #033354 0px 0px 0pt 11pt; } <div class="example"> </div> ...

The issue I am facing currently revolves around the absence of images on

I recently uploaded a captivating HTML page for my website's captive portal. Although the redirection to the designated page is working perfectly, I am facing an issue with the images included in the HTML page. Even though I went ahead and uploaded th ...

The button refuses to navigate to a URL upon being clicked

Struggling with my JavaScript buttons. Currently, they are functioning flawlessly, but I am attempting to change my "Order Online" button into a link that opens a new window to a Menufy menu page. Unfortunately, I can't seem to crack the code on how t ...

Stuck on changing the background color of a DIV in WooCommerce product descriptions with CSS

I seem to be stuck on a simple fix and despite searching everywhere, I can't seem to make it work. The problem lies within WooCommerce on my WordPress site, where I suspect that my CSS is conflicting with WC's and causing some color problems. Yo ...

Stopping video playback when hovering over it

Can anyone help me modify this code so that a video plays only when hovering over it, and stops playing once the hover ends? What changes should I make to the JavaScript portion of the code for this functionality? <div class="padding-box height-40"&g ...

Automatically adjust the height of a React Native view

I am working on a component that consists of three views - one at the top, another in the middle with a specific height, and the last one at the bottom. I want the top and bottom views to adjust their heights accordingly. Although this may seem straightfor ...

Stacking components when scrolling in CSS to create a scrolling effect

I've been attempting to replicate the scrolling animation seen on this particular website: . The effect involves keeping the previous content in place while new content stacks on top as you scroll. I have experimented with using position:sticky and ad ...

Implementing PHP logic for adding a class to an HTML tag

I have a PHP file that handles the sending of my form. Everything is functioning correctly, but I need to make a small modification. When the message is successfully sent, I want PHP to dynamically add the "active" class to a specific div in my HTML. This ...

I am looking for a way to create responsive boxes specifically for lg, md, and sm modes in Bootstrap 5

I need my boxes to be col-12 in col-sm and col-6 in col-md. Can someone please advise me on what steps I should take? If there is a tutorial addressing this issue, kindly share the link with me. Thank you. <div class="content container-fluid col ...

Using the html5 file reader API in JavaScript to retrieve a file as a binary string and then sending it through an ajax request

I'm attempting to obtain the binary string of files, but I seem to be unable to do so. Why does readAsDataUrl work while readAsBinaryString doesn't? I have posted my code on jsbin and any help would be greatly appreciated. Thank you. Check out ...

Preserve Original Styling Using Embedded Web Links

I'm currently in the process of creating internal page links on a website, but I'm facing a challenge in maintaining the original text formatting, which was a basic h4 heading. Despite various attempts, such as using a style with h4 settings and ...

Weather Application featuring Circular Slider

I've been on the hunt for a circular slider animation. Imagine it working like this: <input type="range" min="0" max="50" value="0" step="5" onchange="showValue(this.value)" /> <span id="range">0</span> function showValue(newValue ...

Error Occurred: Angular View Not Loading

I created a new file named new.html to test navigation, but when I load the page View1.html should appear, instead I see a blank page. Below is the content of my new.html: <!DOCTYPE html> <html data-ng-app="demoApp"> <head> ...