0

In SP-2013 on prem, I am trying to hide all elements except the one element where one can browse for pictures, like shown in this picture where I want to hide everything inside the red square.

enter image description here

I wish to hide the elements with css, but it is not working. This is what I wrote in my css, and it is not working for me. Please advice.

#ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow1, #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow2,
#ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow3, #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow5, 
#ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow1, #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow2, 
#ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow3, #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow5,
#ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow1, #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow2, 
#ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow3, #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow5
{
display:none;
}

table.ms-authoringcontrols:first-child tr:nth-of-type(n+5){
display:none;
}
  • You need to try IE DOM (developer tools - F12) to identify proper IDs or classes for your controls & hide them. – Hardik May 25 '16 at 20:18
  • These ID's are found by using developer tools. – Ilyas May 25 '16 at 20:19
  • are you able to hide controls by DOM? – Hardik May 25 '16 at 20:20
  • If i write display:none on .element style in developer tools, yes. But not when it is applied in the css (the css code that can be seen in the opening post) – Ilyas May 25 '16 at 20:21
1

Please try below CSS code.

.ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow1, .ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow2,
.ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow3, .ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl13_tablerow5, 
.ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow1, .ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow2, 
.ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow3, .ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl02_tablerow5,
.ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow1, .ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow2, 
.ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow3, .ms-dialog #ctl00_PlaceHolderDialogBodySection_PlaceHolderDialogBodyMainSection_ctl14_tablerow5
{
display:none;
}

.ms-dialog table.ms-authoringcontrols:first-child tr:nth-of-type(n+5){
display:none;
}

I have added .ms-dialog in your CSS which will find the IDs in dialog box.

  • Hi Hardik, and thanks for your reply. I have tried that also, but to no success. Have you tried it in your environment, and did it work for you ? – Ilyas May 25 '16 at 20:28
  • 1
    Have you inserted that code in your parent page? – Hardik May 25 '16 at 20:30
  • 1
    Please check this article...blog.sharepointexperience.com/2011/09/… – Hardik May 25 '16 at 20:30
  • 1
    Yes i had tried it for my one of the display form of list.. Can you please try display:none !important;? it will overwrite the other css for display. – Hardik May 25 '16 at 20:37
  • 1
    Let us continue this discussion in chat. – Hardik May 25 '16 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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