Difficulty putting a color in the CSS font

Asked

Viewed 5,024 times

2

Observe the following code:

<div class="faxa_menu">
    <div class="row">
        <div class="col-md-4">logo tipo</div>
        <div class="col-md-8">
            <div class="navbar">
                <ul>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">Home</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>

css

.faxa_menu {
    color:#fff;
    position:relative;
    top:30px;
    background: black;
    filter: alpha(opacity = 27);
    -moz-opacity: .27;
    opacity: .27;
}
.navbar {
    color: #fff;
}
.navbar ul {
    list-style: none;
    padding: 0px;
    margin: 0px;
}
.navbar ul li {
    float: left;
}
.navbar ul li a {
    display: block;
    width: 100px;
    text-align: center;
    text-decoration: none;
}

I cannot change the color of the links in the white menu, I accept suggestions. I am using Bootstrap.

2 answers

1


Put it like this:

.navbar ul li a {
    display: block;
    width: 100px;
    text-align: center;
    text-decoration: none;
    color:#fff;
}

I made a fiddle for you to see. In the fiddle the Home disappears because it is with the white background, just mark the text you will see that it got the color white, I believe in your site, with full html, it sits on top of the gray bar.

-2

Try this, I did a test and it worked perfectly.

.navbar ul li a {
    color: #fff;
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.