Styling a span

  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

I have a bit of a problem, I want to style some spans to go black on hover, but not there hover
bascley I have this
Code: [ Select ]
<a href="#"><span class="stylethis">some text here to style on A hover</span></a>

the a link is a large block.
If you want to see what I mean I have done what I can on the site live here http://www.newssync.net
I want the text to go black on the nav links down the side.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

Although a lot of modern browsers support :hover for elements other than the <a> element, you'll still want to track the hover of the <a> element because it's more reliable.

If your classnames are unique to these elements, you can target those spans with this.

CSS Code: [ Select ]
a:hover span.main, a:hover span.speak {color:black;}

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 29 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.