Spaceliving
Spaceliving

Reputation: 81

Site css compatibility with IE 7 not working

Thanks for checking out my post. I am currently re-skinning a html5 template for my employer and have noticed while doing a bit of QA that the site appears to come out completely wrong on ie7 and 8. It seems as if the css styles are not even being pushed to the page.

here is my test link: http://daniloportal.com/NPC/index.html

I have added a couple of ifIE7 ifIE8 lines to my head but doesn't seem to do the trick. Im a newbie when it comes to ie compatibility fix's - any help is GREATLY appreciated.

Thanks! D

Upvotes: 0

Views: 95

Answers (2)

Tamil Selvan C
Tamil Selvan C

Reputation: 20199

Put Doctype and place IE condition at top

<!--[if lt IE 7 ]> <html class="ie6" lang="en" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" lang="en" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" lang="en" xml:lang="en" dir="ltr"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9" lang="en" xml:lang="en" dir="ltr"> <![endif]-->

Upvotes: 1

Adrift
Adrift

Reputation: 59769

You're just missing a doctype (<!DOCTYPE html>) at the top of your file.

This just triggers IE to go into Quirks Mode which causes all sorts of problems. Put the doctype at the top of your file and make sure no-white space or comment precedes it.

Upvotes: 1

Related Questions