Reputation: 7397
I am trying to make the "alt" text of the brand-logo and brand-logo-collapsed link white instead of the default blue like all the other ones. But am unable to figure out the proper css to specifically call that portion. Will someone please guide me in the correct direction.
<a href="#/" class="navbar-brand">
<div class="brand-logo">
<img src="#" alt="Dealer Tracking" class="img-responsive">
</div>
<div class="brand-logo-collapsed">
<img src="#" alt="Dealer Tracking" class="img-responsive">
</div>
</a>
CSS
a > navbar-brand > img {
color: #fff;
}
Upvotes: 0
Views: 141
Reputation: 3435
You can do this:
.brand-logo > img, .brand-logo-collapsed img{
color: white;
}
And if you want to to this for all of your images:
img{
color: white;
}
Upvotes: 1
Reputation: 541
Your element with navbar-brand
class is the same element as the anchor, so need to be treated as such in the CSS (be removing the space in between). Also classnames should be prepended with a .
, and as you have a div
in between the image and the anchor, it will break the rule, as >
only selected direct descendants, so get rid of that:
a.navbar-brand img {
color: #fff;
}
Should get it working.
Upvotes: 2