I've been using this little snippet to add color to a button when there is a cursor rolllover...
<style>
<!--a:hover{color:red; }-->
</style>
Question (okay, dumb one but hey I'm new to css) how can I add another color for a different button? IE I have some "special" buttons that I dont want to go red, but green instead...how?
Jim
<hover> Question on color ???
You add a class to the items you want a different colour for and give it a different style, e.g.:
<div id="myDiv"> <a href="#">Link 1</a> </div> #myDiv a:hover { color: something else; } or <a class="myLink" href="#">Link 1</a> a.myLink:hover { color: something else; }
Um...well....um....
thanks so much....
course being the TOTAL newbie to CSS, means that i have no idea to use what you just offered.
I see that I'm to "name" a link using the <div id="myDiv"> right?
Then where do I put this --
#myDiv a:hover { color: something else; }
And thinking here, can I make multiples too? ie myDiv2 and myDiv3 could also have diff colors too, right?
Just dunno where to put that line?
Jim
<hover> Question on color ???
In the examples I gave above, the first bit is the HTML, the second bit goes in your CSS file. If you're really that unclear about what you need to do, a look at a page might help to direct you better.