How to display a notice to your ie6 users using only css

This is year 2009 and not 1999, it is now time to move a step forward and shun internet explorer 6. Instead of trying to make your site work in internet explorer 6 and waste your precious time you should now consider to politely ask your ie6 visitor to upgrade. There are many ways to do so, but the simplest one i could come up with was using a css hack to display a particular div in ie6 and hide it in other browsers. The trick is to use ie6’s interpretation of _display as display .
Here is the code :

// CSS

#ie6_only {
//Hide it from good browsers
display:none;

//only ie6 will interpret it as display! others wont
_display:block;
}

// XHTML
Your notice to ie 6 users here

Thats all! quite simple, isnt it? much simpler than using javascript or php to detect the browser and take action accordingly.
However you should position the div at such a place and in such a way that it is clearly visible.
You must also be polite in your notice and here is one example :

Dear visitor!
You are using an outdated browser that is not compatible with web standards,
You must consider upgrading to a different browser or a newer version of Internet Explorer to improve your web experience and enhance your online security and privacy
ThankYou

Further, you may consider becoming a supporter of NET magazine’s anti-ie6 campaign at http://www.bringdownie6.com

2018 All rights reserved | Powered by WordPress
Back to top
Theme by dynamicguru.com