Jump to content

CSS Hover Problems


Drezard

Recommended Posts

How come the :hover ending works for:

 

a {
... code
}
a:hover {
... code
}

 

but not for...

 

<style type="text/css">
<!--
.links {
color: #000000;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
.links:hover {
color: #FFCC00;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}

-->
</style>
[code]

Thanks, Daniel

[/code]

Link to comment
https://forums.phpfreaks.com/topic/96695-css-hover-problems/
Share on other sites

Depends on how you write your HTML. This should work...

 

<style type="text/css">
a .links {
color: #000000;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
a .links:hover {
color: #FFCC00;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
</style>

Enjoy.

Link to comment
https://forums.phpfreaks.com/topic/96695-css-hover-problems/#findComment-494829
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.