CSS3 features in the latest browsers

On the Microsoft DevDays 2007 at Amsterdam, in the presentation 'IE7 and Standards' Molly spoke about some new CSS selection features build into the latest browsers.

I've gotten into it myself for a bit. Pretty neat:

  1. /* Only child selector */
  2. #content > p { }
  3.  
  4. /* Adjacent sibling */
  5. th + td { }
  6.  
  7. /* Attribute selectors */
  8. /* Every 'a' element with the 'title' attribute */
  9. a[title] { }
  10. /* Every 'a' element whose 'id' attribute value is exactly equal to 'cart' */
  11. a[id="cart"] { }
  12. /* Every 'img' element whose 'alt' attribute value is a list of space-separated values, one of which is exactly equal to 'bar' */
  13. img[alt~="offer"] { }
  14. /* Every 'img' element whose 'alt' attribute value contains the substring 'offer' */
  15. img[alt*="offer"] { }

These selectors are quite handy, but too bad 40% of the internet users still use Internet Explorer 6 and lower that don't support one bit of CSS3... Yet it ceases to amaze me that CSS2.1 is only a candidate recommendation. Far from version 3.

Here and here are CSS3 compatibility lists. At the time of publishing this article Mozilla 1.7 RC 1 and Safari 1.2 are the most advanced in CSS3, and Opera, who has always had excellent CSS support, has a lot of catching up to do.

While your at it: CSS3 Preview offers a great view off (all?) new CSS3 features.

Author rcz Time Jul 30, 2007 Comment on 'CSS3 features in the latest browsers' Add comment Bookmark 'CSS3 features in the latest browsers' Bookmark Permalink to 'CSS3 features in the latest browsers' Permalink
Bookmark 'CSS3 features in the latest browsers' to Netvouz Bookmark 'CSS3 features in the latest browsers' to Facebook Bookmark 'CSS3 features in the latest browsers' to Furl Bookmark 'CSS3 features in the latest browsers' to Technorati Bookmark 'CSS3 features in the latest browsers' to Stumble Upon Bookmark 'CSS3 features in the latest browsers' to Digg Bookmark 'CSS3 features in the latest browsers' to Del.icio.us

Comments

No comments posted yet.

Add comment

Your name
Your email or website (optional)
Icon
Confirmation code
Confirmation code
Message
face:happy face:glasses face:devilgrin face:crying face:grin face:laughing face:sad face:kiss face:shocked face:wink face:monkey face:angel