I've noticed lately while surfing the net with ie8 that there is the odd site I stumble accross that has problems rendering properly when not in 'Compadability' mode. Now some people might think it's a CSS problem, and sometimes it is. If it is, there is a simple fix by adding two different peices of code. First you need to create a CSS file called 'ie.css' for example, or you can name it whatever you want.
Within that CSS file put the following code:
body { text-align: center; }
#container { width: 950px; margin: 0 auto; text-align: left; }
*where it says 'container', change to what your main content <div> is called.
**where the 'width' is defined, change to represent your website's width.
Now you have to call the CSS file by adding a line of code in the <head> of your website. Simply add the following line of code, and you should be good to go:
<!--[if lt IE 8]>
<link href="http://www.yourwebsite.com/ie.css" mce_href="http://www.yourwebsite.com/ie.css" rel="stylesheet" type="text/css" /><![endif]-->
Sometimes that's not the full problem, and you can fumble around for hours combing through you CSS trying to figure out what's wrong. Now since I develop websites that need to be compadible accross all major browsers (including the dreaded Internet Explorer), and need them to display properly when surfers drop by for a visit there is a simple line of code (a <meta>) I drop into the <head> of the site that forces the 'Compadability' mode in the IE8 Browser, thus rendering it proper (only if you have the 'ie.css' file explained above linked in too) and allowing me to keep some of my hair.
The code is simple, and sweet. Just make sure you place it right after the <head> tag, before any other <meta> tags. The reason for placing it before any other <meta> tags is because IE8 will sometimes completly ignore the command if placed after current tags.
Here's the code:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Like I said, Simple and Sweet! Hope you saved a little of your hair too.....
the tags: code, compadability, Design & SEO Tips, ie8, tutorial










April 22nd, 2010 on 4:47 am
Hey blog muy bonito!! El hombre .. Beautiful .. Amazing .. Voy a su favorito Trabajo y tomar la alimenta también …
April 21st, 2010 on 11:06 pm
Your website is outstanding I will have to read it all, thank you for the diversion from my coursework!
April 19th, 2010 on 4:13 am
Como novato, siempre estoy buscando en línea para los artículos que me puede ayudar. Gracias Wow! Gracias! Siempre quise escribir en mi sitio algo así. ¿Puedo tomar parte de su publico en mi blog Publica ?
January 28th, 2010 on 5:48 am
Thanks for sharing, see you then.
January 27th, 2010 on 11:04 pm
Wow!
) You know a lot!!!
January 23rd, 2010 on 11:00 pm
Cool! Keep up the good work and thank you for sharing.
January 20th, 2010 on 6:41 am
Good idea. Nice post