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

2

6

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.

Izy answered 11/2, 2011 at 8:27 Comment(2)
Which site? There's no link to follow! What is network drive? Where is your site?Disrespectful
@Kyle: I think he's asking about IE's problem with inline-block :). I could be wrong though...Heroine
F
20

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" />
Flyboat answered 11/2, 2011 at 9:49 Comment(7)
+1: almost certainly the right answer. And yes, it is insane. However, it is a setting that can be switched on or off in the browser, so you don't absolutely need to take the meta tag solution, if you have enough control over your intranet PCs to get the flag switched off.Innumerable
@Spudley: Good point, that could be easier depending on your situation.Flyboat
@Izy - the reason I'm fairly sure this is the problem is because inline-block has bugs in IE7 and IE8's IE7-compatibility mode, where the same code works in standard IE8. Also, I had exactly the same scenario at our office; a number of users had the flag switched on, and it took quite a while to work out what the problem was.Innumerable
I think this is the reason but those "tricks" didn't help. We just gave up and use firefox ;).Izy
This recent answer of mine might be helpful, if you'd still like to attempt to fix IE.Flyboat
I had some issues with IE9 AND JQuery scripts so I had to add the <meta http-equiv="X-UA-Compatible" content="IE=8" /> but this is causing the div alignment to shift to the left, it is in the master page by the way.. anyone has similar experience? Thanks.Mina
@Sue: Can you share a link to a page showing the problem? Without seeing it, it's hard to guess what the problem could be.Flyboat
S
0

Use an admin account. IE may Denies access to network drive if not admin.

Sexless answered 11/2, 2011 at 8:35 Comment(1)
I have to try this. But all other css statemenst are fine just this inline block is somehow not rendered correctly.Izy

© 2022 - 2024 — McMap. All rights reserved.