How to change text color for all links in Materialize CSS navbar?


Tags: css,html5,css3,materializecss,materialize

Problem :

How do you change the text color for all navbar links including brand logo in Materialize css. I tries to add like 'black-text' but it only works for the brand-logo. For example,

<a id="logo-container" href="#" class="brand-logo black-text">
    My Logo
</a>

<ul class="right hide-on-med-and-down black-text">
    <li><a href=#">Link 1</a> 
</li></ul>

Again 'black-text' only works for the logo.



Solution :

In your css, add:

.black-text li a{
  color: black;
 }

alternately, you can add the "black-text" class directly to all the links you want to have black text.
example:

       <ul class="right hide-on-med-and-down black-text">
         <li><a class ="black-text" href=#">Link 1</a> 
      </li></ul>

    CSS Howto..

    How to keep an image and text (vmax font) aligned when resizing browser?

    How to position an image list marker so that the text is vertically centered

    navigation drop-down menu in wrapper not showing second level

    How to remove an empty line between two navbars

    How to use one single png image to create multiple website buttons (and their hovers)

    How to make a conjoined input with flexible width

    JS/JQuery: How to switch class several times in a loop way?

    How to make css styles in the document body only specific to a div

    How to make 2 backgrounds “stick” to the sides of a centered div

    How to set a single value of transform while leaving the other values?

    How to control a

    How to set incremental CSS classes in each Table Cell with jQuery?

    How to display two forms next to each other

    How to select by CSS styles in jQuery?

    how to middle vertical-align using bootstrap input-group

    How to customize bootstrap css when using bootstrap-sass [closed]

    JSSOR slider: Image Gallery demo keeps showing highlight image on mobile

    How to add css into .scss file or theme

    How to feather the edges of an image using CSS

    .show() not working on page load

    How can I set a default pseudo styles in my css?

    How to Keep CSS Background Image on top of all divs(breadcrumb arrows)?

    How to set CSS rule for a LI in a UL nested in DIV with class?

    How to access smarty variable in css URL attribute?

    How to make tabs with pure HTML/CSS

    How I can center a menu bar with ul

    how to set image for anchor tag in mvc through css?

    Picture thumbnail shown in Google image search output is
    not , why? [closed]
    It basically comes down to preference. It is considered outdated to use table for data layouts. Use table for just that - actual tables. For the layout and such tasks,...
    Read more

    How to find class =“class1” included class=“class2” in CSS? [closed]

    Using CSS how best to display name value pairs?