Home > OS >  anyone have an idea why is the Background-color not showing up?
anyone have an idea why is the Background-color not showing up?

Time:12-26

Everything in the html is good the elements and the attributes but somehow it doesn't show. Here is my css. It's just the background color nothing else

*{
    margin: 0;
    padding: 0;
}

.navbar{
    background-color: #333;
    color: black; 
}

.navbar h2{
    
    font-size: 22;
    float: left;
    width: 20%;
    color: white;
}

.navbar ul{
    list-style: none;
    float: left;
    width: 80%;
}
.navbar ul li{
    display: inline-block;    
}

.navbar ul li a{
    text-decoration: none;
    display: block;
    padding: 8px;
    color: white;
    
}

.navbar ul li a:hover{
    background-color: #ddd;
    color: black;
}

.clear{
    clear: both;
}

CodePudding user response:

see if you are placing your css stylesheet link tag in head tag above the link tag containing bootstrap cdn in head tag.

  • Related