How do I change the font style of text displayed on hover with CSS?

114
February 20, 2022, at 3:40 PM

I feel like this should be an easy one but nothing I'm doing seems to be working. I may be targeting the element wrong or may be inputting the wrong CSS - I'm fairly new to the coding side of things so any help would be appreciated.

This is for a Wordpress site (page in question is here)

For the CSS component I have tried the following

.project.small.effect-1 .details.has-skills .text {
font-family: 'Oswald'}

and

.project.small .title {
font-family: 'Oswald'}

I've also tried adding !important to override any stylings set by the WP theme but that doesn't seem to be doing the trick either.

Is there something that I'm overlooking here?

Answer 1

Just use CSS:hover Selector. See the snippet below:

p{
  font-family: Arial;
}
p:hover{
  font-family: Courier;
}
<p>The text that will be modified.</p>

More on :hover selector here.

Rent Charter Buses Company
READ ALSO
Images not showing up in Github

Images not showing up in Github

I'm trying to upload my website in GitHub but the images won't showI've tried a lot of the solutions posted here (changing path, changing png to PNG

115
Different scroll speeds for elements in array

Different scroll speeds for elements in array

I have different randomly-styled stars in an array and I would like them to each have different scroll speeds between -2 and -

194
Centering a table header

Centering a table header

I'm having issues centering a single table headerBelow is the tablea snapshot of the table Im trying to center Its header

131
Creating on/off button in react

Creating on/off button in react

I am making a button that is going to say "disable" when its on and "enable" when its offhow do I do that in react?? I have tried to make it but I have no idea where to even start, is there some syntax im missing?

157