简体   繁体   English

SharePoint母版页未设置链接样式

[英]SharePoint Master Page not styling links

I built a Master Page using SharePoint Designer 2010 which references an external stylesheet like so: 我使用SharePoint Designer 2010构建了一个母版页,该母版页引用了如下外部样式表:

<link href="/sites/sandbox/Style%20Library/pscp/styles.css" rel="stylesheet" type="text/css">

In the design mode of the master page, all of the styles are reflected correctly, likewise when I create a new .aspx based on that master page. 在母版页的设计模式下,所有样式均正确反映,同样,当我基于该母版页创建新的.aspx时,也是如此。 However, when I preview the .aspx on Internet Explorer, all of the styles work except for the ones that apply to styling <a href> elements (for example, hover, color, etc.). 但是,当我在Internet Explorer上预览.aspx时,除适用于设置<a href>元素样式的样式(例如,悬停,颜色等)外,所有样式均有效。

Adding the styles in-line to the <a href> elements in the master page make it so that they are reflected in the preview of the .aspx, but if I add the styles pertaining to links at the top of the master page using <styles> tags, it stops working, too. 将样式内联添加到母版页中的<a href>元素中,以使其反映在.aspx的预览中,但是如果我使用<styles>添加与母版页顶部链接有关的样式,请使用<styles>标签,它也停止工作。

Anyone have any ideas as to why styling links with an external stylesheet doesn't seem to work? 任何人都对为什么使用外部样式表的样式链接似乎无效没有任何想法? Thank you in advance. 先感谢您。

there are quite a few ways to reference your resources 有很多方法可以引用您的资源

<SharePoint:CssRegistration name="/Style Library/OVERRIDE.css" After="COREV4.css" runat="server"/>

be careful on testing on IE because often you will experience cache on the browser, cache on the load balancers, and the compatibility mode, which you can disable for yourself, but remember other users still have it enabled 在IE上进行测试时要小心,因为经常会遇到浏览器上的缓存,负载平衡器上的缓存以及兼容模式,您可以自己禁用它们,但请记住其他用户仍然启用了它

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

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