Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • 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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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