简体   繁体   English

CSSClass在C#.NET中不起作用

[英]CSSClass not working in C# .NET

I am not a .NET person so I have very little knowledge about .NET. 我不是.NET人士,所以我对.NET的了解很少。 I work as ERP Implementation Consultant. 我是ERP实施顾问。 I work with C# .NET only when need be. 我仅在需要时使用C#.NET。

I am facing a strange issue with CSS on C#. 我在C#上遇到CSS的奇怪问题。

The CSS works fine on IE when I run my project via the development environment ie Visual Studio Express 2013 for Web. 通过开发环境(即Visual Studio Express 2013 for Web)运行项目时,CSS在IE上运行良好。

But when I publish the project the CSS works only on Firefox but not on IE. 但是,当我发布项目时,CSS仅在Firefox上有效,而在IE上无效。 I have tried to give as much details as possible. 我试图提供尽可能多的细节。 If you need any further details please let me know. 如果您需要更多详细信息,请告诉我。

I am trying to present the production data in 24 hour clock format. 我正在尝试以24小时时钟格式显示生产数据。 Hence the project. 因此,该项目。 All I have done is, built a table and placed text boxes in table cells. 我要做的就是建立一个表格并将文本框放在表格单元格中。 The data gets filled in from a SQL table. 数据从SQL表填充。 Everything works apart from visual issues. 一切都与视觉问题无关。

A) TEST run via VS 2013 Web (IE 10) & Website Published on IIS8 and viewed through Firefox (34.0.5) A)通过VS 2013 Web(IE 10)和在IIS8上发布并通过Firefox查看的网站进行测试(34.0.5)

https://my.pcloud.com/publink/show?code=XZW1v7ZuoPYebh9GWSbaaXG8auQF0oiBsAX https://my.pcloud.com/publink/show?code=XZW1v7ZuoPYebh9GWSbaaXG8auQF0oiBsAX

B) The same website viewed through IE 10 B)通过IE 10浏览相同的网站

https://my.pcloud.com/publink/show?code=XZQ1v7ZY3mayDOwwSmthL8fySHs18qGiguX https://my.pcloud.com/publink/show?code=XZQ1v7ZY3mayDOwwSmthL8fySHs18qGiguX

D) The actual CSS D)实际的CSS

<style type="text/css">
    .ActTxtBoxInTable
    {
        text-align:right;
        border:none;
        background-color:white;
        width:60px;
        font-size:x-large;
        font-weight:800;
        color:black;
    }

    .ActTxtBoxInTableLR
    {
        text-align:right;
        border:none;
        background-color:white;
        width:60px;
        font-size:x-large;
        font-weight:800;
        color:black;
    }

    .HrsTxtBoxInTable
    {
        text-align:center;
        border:none;
        background-color:navy;
        width:60px;
        font-size:x-large;
        font-weight:800;
        color:yellow;
        border-radius:6px;
    }

    .HrsTxtBoxInTableLR
    {
        text-align:center;
        border:none;
        background-color:navy;
        width:60px;
        font-size:x-large;
        font-weight:800;
        color:yellow;
        border-radius:6px;
    }
</style>

Thanks in advance. 提前致谢。 Any help is greatly appreciated. 任何帮助是极大的赞赏。

Uday 乌代

To make everything works fine in IE, i suggest you to refer " http://css3pie.com/ ". 为了使所有功能在IE中都能正常运行,我建议您引用“ http://css3pie.com/ ”。

Download the PIE.htc and PIE_IE678.js from the website and add a new folder names as pie in your application. 从网站上下载PIE.htcPIE_IE678.js ,并在应用程序中添加一个新的文件夹名称作为pie And in your all css classes add below two properties. 并在所有CSS类中添加以下两个属性。

 behavior: url(pie/PIE.htc);
 position: relative;

I had few issues for my application and i got the solution by referring this.Modify and let us know if you have any issues. 我的应用程序遇到了几个问题,我通过参考this解决了问题。修改并让我们知道您是否有任何问题。

Include this in header of html and try. 将此包含在html标头中,然后尝试。

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

Refer this link for Info 参考此链接获取信息

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM