Matthew what happens is that you are using two color classes of Materialize in your tag <a>
and those colour classes grey-text
and text-darken-1
of Materialize have by default !important
on the property color
, with that even putting a:hover{ color:red;}
the color will not be applied. I suggest you read here: Which css selector has priority?
See this image to understand better.
Hint to apply the color
One of the options is to put !important
also in the style you will do to apply the new color. For example as I did in the code below.
.texto-red:hover{ color:red !important }
Perform in "Whole page" to see the full menu and links
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.texto-red:hover{ color:red !important }
</style>
</head>
<body>
<nav class="white" style="padding:0px 10px;">
<div class="nav-wrapper ">
<a href="#" class="brand-logo indigo-text text-darken-4">MATTAR</a>
<a href="#" class="sidenav-trigger" data-target ="mobile-nav">
<i class="material-icons indigo-text text-darken-4">menu</i>
</a>
<ul class="right hide-on-med-and-down">
<li><a href="#" class=" grey-text text-darken-1 texto-red">HOME</a></li>
<li><a href="#" class=" grey-text text-darken-1 texto-red">SERVICES</a></li>
<li><a href="#" class=" grey-text text-darken-1 texto-red">ABOUT</a></li>
<li><a href="#" class=" grey-text text-darken-1 texto-red">CONTACT</a></li>
</ul>
</div>
</nav>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
</body>
</html>
I created a codiggo to customize Hover, but it’s empty. tried: an a:Hover{ color:red;} but it didn’t work
– Mateus Araújo