Warning: Creating default object from empty value in /home/expressionz/developer.expressionz.in/blogs/wp-content/plugins/download-monitor/classes/download_taxonomies.class.php on line 156

Warning: Creating default object from empty value in /home/expressionz/developer.expressionz.in/blogs/wp-content/plugins/download-monitor/classes/download_taxonomies.class.php on line 156

Warning: Creating default object from empty value in /home/expressionz/developer.expressionz.in/blogs/wp-content/plugins/download-monitor/classes/download_taxonomies.class.php on line 156
2011 July | Expressing IT

Archive for July, 2011

The question of CSS hack

Thursday, July 7th, 2011 By Nik

I had read this in some blog. Thought it was nice to catalog this for future ref. and also could be an important interview question that you would be asked some day.

Write a snippet of CSS that will display a paragraph in blue in older browsers, red in newer browsers, green in IE6 and black in IE7

#content p{color:blue} /* New Browsers */
html>body #content p {color:red} /* Older Browsers */
* html #content p{color:green} /* IE 6  only Hack */
html>body #content p {*color:black;} /* IE 7 only Hack*/

PS. Sorry! I haven’t tested it!!!


get ExpressingIT News by Email Subscribe to ExpressingIT by Email or  Follow Me on Twitter


 Subscribe to ExpressingIT RSS
get ExpressingIT News by Email Subscribe to ExpressingIT by Email
 Follow Me on Twitter