SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: CSS detection

Hybrid View

  1. #1
    Bored One boredboi's Avatar
    Join Date
    Jul 2000
    Posts
    238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there anyway I can detect if a browser supports CSS, using javascript?

    How about detecting specific Specs? like css1 or css2?

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is simple...

    IE 3+ and Netscape 4+ support various levels of CSS1.

    IE4+ and Netscape 6+ support various levels of CSS2.

    There is no way to check for CSS support in Javascript other than checking each property on the object in question. You can check for DOM support and/or layer support and assume that if these exist then there is some level of CSS support there, but you can't check which attributes each browser supports and doesn't support. For a good browser detection script check out the tutorials located in the Scriptorium at ww.bratta.com/.

    ------------------
    Wayne Luke - Sitepoint Forums Administrator
    Digital Magician Magazine - MetaQuark Creations (Coming Soon)
    wayne@sitepoint.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •