Blerta
Blerta

Reputation: 2190

web page different display with localhost and ip address

I am experiencing a strange problem with my website today. I have my local code in aspx , which i can browse perfectly in ie and firefox, I publish it in my computer and create a virtual web site and then browse it with both firefox and ie like http://localhost/testwebsite/default.aspx and it displays also perfectly but when switching from localhost to my local ip address the page displays strange in the element layout, they lay in strange order not like they should.

I am not being able to figure out this problem? Is it some new problem of ie. What is so different when browsing by localhost and ip for the same published code. The only one doubt would be about relative css and javascript paths but we checked them and they appear fine.

Upvotes: 5

Views: 4807

Answers (4)

Otavio Ramos
Otavio Ramos

Reputation: 11

if you are using IE9 press F12 and see the "compatible type" when you run from the IP and "localhost". I was facing the same problem here, the IP was using IE8 compatible mode.

Upvotes: 1

Llandr
Llandr

Reputation: 11

If you have trouble with IE8 forcing an intranet site of mine to be viewed in IE7 compatibility mode. You could also uncheck Tools|Compability View Settings|Display Intranet Sites in Compability View. (This should have been a comment to MarkKBS answer but I got no comment button)

Upvotes: 1

MarkAG
MarkAG

Reputation: 101

Try adding the following meta tag to the head of your page:

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

I was having a similar problem with IE8 forcing an intranet site of mine to be viewed in IE7 compatibility mode.

Upvotes: 10

MJB
MJB

Reputation: 7686

Try using something like Firebug to see that all of your file references are in fact correct. You might be missing some default CSS that is mostly overridden. If you install firebug, you can see that even though you requested a file you are not getting it, plus a whole lot of other stuff that might help in future scenarios.

Upvotes: 0

Related Questions