This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes document.styleSheets[0].Rules Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "document.styleSheets[0].Rules" Watch "document.styleSheets[0].Rules" New topic


Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Good Day,

I have the following function -

What's the difference between document.styleSheets[0].rules and document.styleSheets[0].cssRules ?

[ January 23, 2008: Message edited by: Dan Drillich ]

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Firefox and IE use different implementations.

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Thank you Eric!
It is sorta covered in the JavaRanch Style Guide.
subject: document.styleSheets[0].Rules
Similar Threads
change CSS rules dynamic with JavaScript
document.styleSheets[0].cssRules is null
Can javascript modify CSS classes?
Javascript menu problem
slow for loops inside javascript..