CSS style is different in Localhost vs Machine Name

I am going to complete the implementation for my first ExtJS-based application. But at the moment I am faced with a strange problem.

I use ASP.net on the server and then ExtJS on the client. I noticed that if I started this project from Visual Studio Debugger, then it works well, in which case my browser URL was set to

http: //localhost/MyApp/Home.aspx

But as soon as I open a new browser and click

http: //MyWorkStationName/MyApp/Home.aspx

he behaves a little differently. For example, some button shapes do not display properly. See this image

Can any body let me know how I can debug this problem. basically, how can the hostname and localhost in the url affect the style?

Thanks in advance!

+4
source share
3 answers

I had the same problem too. This is due to the compatibility issue in ie8. go to tools-> compatibility View settings uncheck the box "Display intranet sites in the Compatibility view."

In the local host or when starting from VS. This is not in compatibility mode. And it works fine in that or in FF. But as soon as we change the local host to hostname / machinename, it will go to the compatibility view (default setting). The jQuery drag and drop feature also posed some problems. when he was working in compatibility mode.

+6
source

Use this first in the header: <meta http-equiv="X-UA-Compatible" content="IE=9">

+2
source

You can use Firebug or IE Developer tools to debug css (> = IE 8, preferably if Firefox is not an option.).

0
source

Source: https://habr.com/ru/post/1338431/


All Articles