简体   繁体   English

iis的网站布局有所不同

[英]site layout different when going through iis

I have used my local iis to test the site and now that its been placed on a server the layout looks "odd" with bits missing, mis-alligned, or a table with half the borders one colour and the other half another colour (which I don't have anywhere) 我已经使用本地iis对该站点进行了测试,现在将其放置在服务器上,布局看起来“奇特”,缺少位,分配错误,或者表的边框一半是一种颜色,另一半是另一种颜色(我什么都没有

I know, its not the CSS file, the items are pretty much in their respective places (else things would be completely messed up and most things are set in the aspx page anyway), but just small issues such as text that looks aliased, odd table cell widths, thicker than I've mentioned borders, dropdownlist arrows not the set colours, etc. 我知道,它不是CSS文件,项目在各自的位置都差不多了(否则其他东西将被完全弄乱,无论如何大多数内容都将在aspx页面中设置),但是只是一些小问题,例如看起来像是别名,奇怪的文本表格单元格的宽度,比我提到的边框还要厚,下拉列表箭头而不是设置的颜色等。

The only difference I can see is that I have iis 6.1 on my machine and 6.0 on the server. 我能看到的唯一区别是,我的机器上有iis 6.1,服务器上有6.0。

How to fix this? 如何解决这个问题? Its almost like the server is sending the site at a different resolution. 它几乎就像服务器以不同的分辨率发送站点一样。 It has totally messed up the whole site. 它完全弄乱了整个站点。

The site will be accessed by ie9 and intranet only. 该站点只能通过ie9和Intranet访问。

Sounds like your company policy is rendering intranet websites in "compatibility mode" which breaks some of the more proper CSS. 听起来您的公司政策是在“兼容模式”下渲染Intranet网站,这破坏了一些更合适的CSS。

Try adding this line to the <head> part of your page: 尝试将此行添加到页面的<head>部分:

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

Or the following to display in the highest mode available (sometimes this isn't desired, especially in organizations with older versions of IE): 或以下内容以可用的最高模式显示(有时不希望这样做,尤其是在具有旧版IE的组织中):

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

This should force the page out of "compatibility mode" and render the page properly. 这将强制页面退出“兼容模式”并正确呈现页面。

For more details on the different values for this meta tag, check out this SO question: What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do? 有关此meta标记的不同值的更多详细信息,请查看以下SO问题: <meta http-equiv =“ X-UA-Compatible” content =“ IE = edge”>是做什么的?

2015 Update - changed the example to something newer than IE8, also included link to a great explanation of the different options 2015年更新-将示例更改为比IE8更新的示例,还包含指向不同选项的详细说明的链接

Maybe it's because you have rules to use|not to use IE compability mode on local intranet and internet. 可能是因为您有规则要在本地Intranet和Internet上使用|不使用IE兼容模式。

Also problem can be caused by different applied security rules (some css files may be unavailable due to authorization settings), but it's common using IIS 6.x and 7.x or higher and you have the same... 同样的问题也可能是由不同的应用安全规则引起的(由于授权设置,某些css文件可能不可用),但是使用IIS 6.x和7.x或更高版本是常见的,并且您具有相同的...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从网络外部访问站点时,IIS网站路径的行为有所不同 - IIS website paths behave different when accessing the site from outside the network 另一个站点内的IIS站点,不同的web.config - IIS Site inside another site, different web.config 在不同机器上的IIS中的不同网站上创建应用程序 - create application on different web site in IIS on different machine 为什么IIS网站在添加站点名称时不起作用 - Why IIS web site not working when adding Site name 为什么网站项目不能通过IIS而不提供页面? - Why is a Web Site project not serving pages except through IIS? 针对同一站点IIS 7的两个子域的不同默认文档 - Different default documents for two subdomains that go against the same site IIS 7 一个IIS站点,两个具有不同.NET版本的应用程序 - One IIS site, Two applications with different .NET versions IIS7-2个具有相同IP和相同端口号的不同站点 - IIS7 - 2 different site with same ip and same port number 我尝试通过VS打开网站添加IIS Express网站后未在IIS中显示它 - IIS express site not showing up in IIS after I try adding it through VS open website 在IIS 7中浏览时缺少Crystalreports工具栏 - Crystalreports toolbar is missing when browsing through iis 7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM