Click here to Skip to main content
15,895,656 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been using Bootstrap bg-dark, but made my own color

HTML
<div class="min-vh-100 d-flex flex-column">

        <header>
            <nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark border-bottom box-shadow">
                ...
            </nav>
        </header>

        <div class="flex-fill d-flex flex-column mt-5">
            <div class="container d-flex flex-column flex-fill">
                <div class="row flex-fill">
                    <div class="col-md-9 bg-light p-1">
                        <main role="main" class="pb-3">
                            @RenderBody()
                        </main>
                    </div>
                    <div class="col-md-3 bg-info p-1 align-content-center">
                        ...
                    </div>
                </div>
            </div>
        </div>

        <footer class="border-top footer bg-dark text-light">
            ...
        </footer>

    </div>


CSS
.bg-navbar {
    background-color: #181818 !important;
}


But after switching to new class, navbar does not change color, but gets overlapped by website body. I know that CSS is not the best thing on earth, but i did not expect it to be that glitchy. What is the best bypass for that issue?

What I have tried:

Nothing in particular because no one else ever had that glitch, so it's hard to find solution for that thing.
Posted
Updated 31-Mar-21 9:14am
v2
Comments
W Balboos, GHB 31-Mar-21 7:41am    
How ought we figure out anything when we don't have any of your actual code?

I cannot speak for ASP.NET, but CSS is not "glitchy" in this way - there is an error, somewher, perhaps other members of your CSS class (no way we can tell).

1 solution

First of all, don't blame CSS and that "no one else" excuse for trying "nothing in particular" - meaning nothing.

The code you finally included shows a location with bg-dark so one could guess that's what you are replacing but maybe not. And how are you doing the replacement? With your keyboard? With DOM ?

For that matter, do you know what, if anything, is part of the bg-dark class? You really still tell us next to nothing.

Your comment about CSS is such that either you've little to no experience with CSS or you hope someone will do the work for you. Here's the work.[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900