Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将CSS应用于单个Web部件上的Sharepoint网站_Css_Sharepoint_Sharepoint 2013 - Fatal编程技术网

将CSS应用于单个Web部件上的Sharepoint网站

将CSS应用于单个Web部件上的Sharepoint网站,css,sharepoint,sharepoint-2013,Css,Sharepoint,Sharepoint 2013,这项工作正在sharepoint 2013中完成。我想对某个web部件应用height:0px。我的DIV ID为MSOPictureLibrarySlideshowWebPart_ctl00_ctl41_g_3d56d9c5_7b24_4bb9_9b84_ac3459578026_cell 我试着把代码放在我的样式表中(已经加载了,样式表中的其他东西也可以使用) 但这似乎对我不起作用。我做错了什么?看起来你忘了英镑: #MSOPictureLibrarySlideshowWebPart_ctl

这项工作正在sharepoint 2013中完成。我想对某个web部件应用
height:0px
。我的DIV ID为
MSOPictureLibrarySlideshowWebPart_ctl00_ctl41_g_3d56d9c5_7b24_4bb9_9b84_ac3459578026_cell

我试着把代码放在我的样式表中(已经加载了,样式表中的其他东西也可以使用)


但这似乎对我不起作用。我做错了什么?

看起来你忘了英镑:

#MSOPictureLibrarySlideshowWebPart_ctl00_ctl41_g_3d56d9c5_7b24_4bb9_9b84_ac3459578026_cell {
   height:0px;
}

我通常使用css类来标识Web部件(并避免使用asp.net提供给.net控件的难看的客户端id)。为了做到这一点,我使用CssClass属性指定了一个css类名,以后用于应用所需的功能

比如:


我希望有帮助

非常感谢你,没有意识到这一点我感到很愚蠢。编辑,为其他试图做同样的事情。我还得补充一句!重要信息:覆盖默认sharepoint值。但它是有效的。非常感谢
#MSOPictureLibrarySlideshowWebPart_ctl00_ctl41_g_3d56d9c5_7b24_4bb9_9b84_ac3459578026_cell {
   height:0px;
}
<wpPrefix:myWebPart id="someID" CssClass="myCustomCssClass" runat="server" />
.myCustomCssClass{
    height: 0px;
}