IE not rendering CSS properly when the site is located at networkdrive
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" />
Problems loading some CSS styles with Internet Explorer accessing from computer name
See: IE not rendering CSS properly when the site is located at networkdrive
Add this:
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
Will targeting IE8 with conditional comments work?
It worked for me – both in quirks mode and in standards compliance mode. However, it does not work when switching to IE8 compatibility mode.
Same HTML gives Different Layout on Different Hosts
It's possible that a server module is messing with your output and confusing IE. For example, mod_pagespeed does this for optimization purposes, although I haven't heard of a problem with IE. I would run diff
on the source code that IE is reading (not the saved file themselves).
If they turn out to be identical, I would suspect an issue with Quirks Mode (which the other answers address more thoroughly than I could).
IE8 standards mode meta tag
You could set X-UA-Compatible
as a HTTP response header, instead of as a meta tag.
This is a much cleaner solution than placing it above the <html>
tag.
A confusing useful blog post concerning X-UA-Compatible
and its many intricacies:
http://farukat.es/journal/2009/05/245-ie8-and-the-x-ua-compatible-situation
Related Topics
How to Make a Fieldset Legend-Style "Background Line" on Heading Text
What's the Maximum Pixel Value of CSS Width and Height Properties
Difference Between Body and * in CSS
Display:Inline Resets Height and Width
How to Make CSS A:Active Work After the Click
Zebra Striping a Table with Hidden Rows Using CSS3
How to Render Multiple Columns with Markdown in Github Readme
Sass @Each Variable Interpolation
Build List of Selectors with Less
Bootstrap 4 Navbar and Content Fill Height Flexbox
How to Extend CSS Class with Another Style
Setting Different Lengths for Grid Gaps in CSS Grid
How to Preserve Line Breaks in <Code> Block
How to Combine Two Media Queries
Why Doesn't Min-Content Work with Auto-Fill or Auto-Fit
How to Have a Varying Number of Columns Per Row in a CSS Grid