• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Why won't the attached code run when I add to the HTML source code on our Sharepoint 2010 Foundation Site?

Several months ago I added the attached code to the HTML source code in the Content Web part to hide the Recycle Bin and All Site Content in the left column of one the pages on our Sharepoint 2010 Foundation Site.
Worked fine. Now when I do this I get a message that the HTML code may have been modified and it won't run. I probably forgot a step. Any suggestions? Thanks
/*--Hide Quick Launch --*/
#s4-leftpanel{
display:none
}
.s4-ca{
margin-left:0px
}

Open in new window

0
PDSWSS
Asked:
PDSWSS
  • 6
  • 3
2 Solutions
 
jessc7Commented:
Try this:
<style type="text/css">
/*--Hide Quick Launch --*/
#s4-leftpanel{
display:none
}
.s4-ca{
margin-left:0px
}
</style>

Open in new window

0
 
PDSWSSAuthor Commented:
Thanks. Get the same code modified message.

Is this the correct process?

I choose Edit the Page
Add the Content Web Part to the Page and then choose HTML source and add the
code to the end of that file.

Then I get the code appears to be modified message. Is this a permissions issue?
0
 
jessc7Commented:
The code appears to be modified message is displayed almost every time a Content Editor web part is displayed. At least that is my exprience. I don't know if it is just reformatting white space some times or what.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jessc7Commented:
Sorry - I meant every time a Content Editor web part is saved/modified.
0
 
jessc7Commented:
Interesting. Just tried it on my test VM, and I see what you mean. The source gets modified.
0
 
jessc7Commented:
I just went through the steps again, and was able to do it. I think SharePoint gets confused with whether the HTML is being added to a Content Editor web part or the Wiki Page area. Apparently SharePoint will modify the CSS in the Wiki Page area, so I took explicit steps to make sure I was editing the Content Editor web part.

http://screencast.com/t/5tGdzuGdJ
0
 
PDSWSSAuthor Commented:
Great job and that video give you an A+. Thanks
0
 
PDSWSSAuthor Commented:
With the Video = A+. Thanks again
0
 
jessc7Commented:
Thanks. :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now