How can I change the text color inside a div on hover?
The text color doesn’t seem to change, but everything else does
Here’s a look at what am talking about
<div className="hover:bg-blue-100 hover:border-blue-500 hover:text-blue-600">
<p>Change textcolor inside here....</p>
</div>
2
Answers
As Gabriele mentioned, use the
class
attribute if this is standard HTML and not JSX.in order to change the aspect of an element with hover you must to put this into the css
where red could be any other color and .myelemntclass is just the class name of your element.