共用方式為


CSS Class Selectors and ID Selectors

MOVED

This content has been moved to my new blog at

https://petelepage.com/blog/2006/06/css-class-selectors-and-id-selectors/

Thanks,
PEte

Comments

  • Anonymous
    June 07, 2006
    Hi Pete,

    I've been reading your blog for a while, but this is finaly THE useful entry in the css field you've written :-) Excellent! We moved to more experienced waters and I hope we'll stay there.

    Last CSS entries on your blog weren't bad at all (and considering it is a rarity theme on asp.net blog scene it was nice) but were a bit basic or raw overall...but this one rocks hard!

    very useful post, thank you, combining classes is a very nice feature!
  • Anonymous
    June 08, 2006
    Sorry, but I could not see any differences in the styles of the links you mentioned with firefox or ie6.  I can send you a screen shot if you want.
  • Anonymous
    June 08, 2006
    There seems to be a bug in IE7 then. The attribute selector is a[href="http://www.microsoft.com"] but the actual attribute is http://www.microsoft.com/ (note the trailing slash).  If we look at the W3C page on attribute selectors (http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors) it says

    [att=val]
    Match when the element's "att" attribute value is exactly "val".

    It even gives and example of an a href match and says it must be exact. So the fact that it matches in IE7 would be a bug in IE7.
  • Anonymous
    June 08, 2006
    Hi Rosyna,

    Good point!  It wasn't matching in IE7 for some reason, and I was figuring it had to do with my copy of IE7 being wonky (I'm on a version post beta).  But I just looked, and in fact, it looks like it's not that, but the rendering engine for the blog edited my html, and added the / to the end so that it didn't match.  If you look at the one on my website, the one that is linked, it should be okay.

    PEte
  • Anonymous
    June 09, 2009
    PingBack from http://greenteafatburner.info/story.php?id=2208