Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE not rendering CSS properly when the site is located at networkdrive

This is kinda weird problem we came across with my friend. We located our site at network drive and tried to open it from there. All other browsers render this page just fine but IE (btw. why it's always IE? :) ) can't understand inline-block statement. But if I copy our file to my local drive there is no problem, IE renders everything just like other browsers. I tested this with IE7-9b.

like image 288
Roggo Avatar asked Feb 11 '11 08:02

Roggo


People also ask

Why is my Internet Explorer not displaying websites properly?

Click the Tools button, and then click Internet Options. Click the Advanced tab, and then click Reset. In the Reset Internet Explorer Settings dialog box, click Reset. When Internet Explorer finishes applying default settings, click Close, click OK, and then click OK again.

Does CSS work in Internet Explorer?

CSS all property is Not Supported on Internet Explorer 10. If you use CSS all property and your users are using Internet Explorer 10, then they would see the feature properly. That doesn't guarantee that other web technologies are also compatible in Internet Explorer 10 though.


1 Answers

This sounds like that problem - where IE switches rendering modes depending on where the page is located.

It's insane.

See this answer.

http://127.0.0.1/mysite/mypage.php  <-- IE8 by default (updated!)
http://localhost/mysite/mypage.php  <-- IE8 by default (updated!)
http://machinename/mysite/mypage.php  <-- IE7 by default
http://192.168.100.x/mysite/mypage.php  <-- IE7 by default
http://google.com/  <-- IE8 by default

So, because you're accessing your site via "network drive", IE is going into IE7 mode, and IE7 does not support inline-block properly, hence your site does not render properly.

You can request IE8 to render your page in IE8 mode by adding this to your page:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

Or, to request IE8 to use the most recent version of it's rendering engine (think IE9), you should use this:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

Or, to use Chrome Frame instead if it's available:

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
like image 139
thirtydot Avatar answered Sep 30 '22 19:09

thirtydot