Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

This is being done in sharepoint 2013. I want to apply height:0px to a certain web part. I have its DIV ID as MSOPictureLibrarySlideshowWebPart_ctl00_ctl41_g_3d56d9c5_7b24_4bb9_9b84_ac3459578026_cell

I tried putting the code in my style sheet (which is loaded, other stuff from the style sheet works)

MSOPictureLibrarySlideshowWebPart_ctl00_ctl41_g_3d56d9c5_7b24_4bb9_9b84_ac3459578026_cell{height:0px;}

but that doesn't seem to be working for me. What am I doing wrong?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It looks like you forgot the pound:

#MSOPictureLibrarySlideshowWebPart_ctl00_ctl41_g_3d56d9c5_7b24_4bb9_9b84_ac3459578026_cell {
   height:0px;
}
share|improve this answer
    
Thank you so much, I feel so stupid for not realizing this. EDIT, for others trying to do the same thing. I also had to add !important to override the default sharepoint value. But it works. Thanks so much –  Thomas Boop Jul 10 '13 at 16:30

I usually use a css class to identify the Web Part (and to avoid using the ugly client id that asp.net provides to the .net controls). In order to do that i use the CssClass property assigning a css class name used later to apply the desired functionality.

like:

<wpPrefix:myWebPart id="someID" CssClass="myCustomCssClass" runat="server" />

and the css class defined wherever i need:

.myCustomCssClass{
    height: 0px;
}

i hope it helps!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.