How to apply CSS to HTML body element?

Posted by Manohar on Stack Overflow See other posts from Stack Overflow or by Manohar
Published on 2010-04-06T03:52:36Z Indexed on 2010/04/06 4:03 UTC
Read the original article Hit count: 578

Filed under:
|
|
|
|

I am trying to get rid of this:

document.body.className = "someclass";

I want to do this in CSS.

body.someclass {
.
.
.
}

unfortunately I am not able to get this working in Firefox, chrome.

Am I doing anything wrong here? Is there any way we could apply a CSS class to body?

© Stack Overflow or respective owner

Related posts about XHTML

Related posts about html