CSS wiz... a few markup questions

Discussion in 'CSS' started by xira, Jul 12, 2010.

  1. #1
    I was given a horizontal menu with sticky hovers, and there are a few CSS items that baffle me.

    What does the use of the star mean? .menu *

    The html has only two classes, sf-menu and current. Yet the links are using this:
    .menu li:hover ul, .menu li.sfHover ul
    There is no li.sf. So what is it targeting? Why is there a capital H for hover in the second one?

    Finally, is there a website that has all these kinds of tricks and nuances that I can read up on them?

    Thanks in advance
     
    xira, Jul 12, 2010 IP
  2. Deacalion

    Deacalion Peon

    Messages:
    438
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The asterisk (*) is a CSS selector. It's the universal selector that matches everything and anything. a * would match the span in this link <a href="#"><span>Click</span></a>.

    As for the sfHover, I have never seen it before. Unlike the :hover psuedo-class it's a real class. My guess is that it's a class applied to menus/links via a javascript library.
     
    Deacalion, Jul 13, 2010 IP