Enforcing IE8 mode with IE8 browsers

IE8 browers will default to IE7 document mode if the headers are not enforced.

Add the DOC type before the html tag

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

and the meta tag in the header section
<meta http-equiv="x-ua-compatible" content="IE=8" >

IT will make life a lot easier but newer browsers will also view in IE8.

Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Sitecritic.net Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.