This is one example of hiding several page elements by using the following style code in the Source Code of the CEWP.
This is good to apply when you want to create report pages where they simply right click and select Print Preview, then remove Headers and Footers, then print.
- Add a Content Editor Web Part to the page you want to hide the elements on,
- then Modify the CEWP as you want it (Title, Border, visibility, etc)
- then click on the Source Code button and paste to the very top of the code the elements below you want to hide.
<style>
#ct100_PlaceHolderLeftNavBar_idNavLinkViewAll
{
Visibility:hidden;
}
#ctl00_PlaceHolderLeftNavBar_idNavLinkRecycleBin
{
Visibility:hidden;
}
.ms-searchform
{
display: none
}
.ms-bannerContainer
{
Display:none
}
.ms-bannerframe
{
Display:none
}
.ms-bodyareaframe
{
Border:0
}
.ms-bodyareapagemargin
{
Display:none
}
.ms-globalbreadcrumb
{
Display:none
}
.ms-globalleft
{
Display:none
}
.ms-globallinks
{
Display:none
}
.ms-globalright
{
Display:none
}
.ms-globalTitleArea
{
Display:none
}
.ms-navframe
{
Display:none
}.ms-pagetitle
{
Display:none
}
</style>
No comments:
Post a Comment