4.06.2008

CSS Naked Day

This is the 3rd year of CSS Naked Day. You may go CSS Naked Day for more information. To promote Web Standards and demonstrate the HTML with semantic markups and well-formed (X)HTML, participant will turn off their CSS styles.

What do I do?
Since I can't write PHP in blogspot, then I wrote a JavaScript to disable all stylesheets. when the date is April 9th. Here's the example:

/* Put this in your HEAD tag */
function naked(){
if(timeNow.getDate()!=9 || timeNow.getMonth()!=3) return ;
for(var s=0;s<document.styleSheets.length;s++){
document.styleSheets[s].disabled = true;
}
}
naked();

Since there is an article said that Safari, Konqueror and ICEbrowser poorly support the styleSheets object. If you want to support Safari, you need to put this before </body> or in window onload event:
/* Put this before the end of BODY tag */
nake();


I have no idea why I can't access styleSheets object within HEAD tag in Safari. :(
Anyway, enjoy the CSS Naked Day!



No comments: