How do I stop html hover action on normal text?

  • Thread starter Thread starter FoxII
  • Start date Start date
F

FoxII

Guest
I am using css to define a hover action (the link changes colour on hover), but after I end the link, the text after it changes colour when I hover over it too; which I don't want. To make it easier, I'll give an explanation - stuff in between two brackets are notes:

<a ((set up as one colour for hover in css)) href="contact.html">Contact<a /> us here. ((these words are also changing colour on hover which I don't want; not as a link, but changing colour))
 
Might not be the case, but your ending anchor is incorrect. It's supposed to be "</a>", not "<a />". That might be the reason why it's controlling everything else.

Since you didn't close the anchor link properly, the HTML will just continue on to whatever text you have after it, with the styles first defined in the opening <a> tag.
 
Back
Top