سؤال

I am trying to hide the top navigation when printing. I am currently using the following CSS to do so:

<style>
@media print
{#ms-breadcrumb-top{display:none !important;
    }
}
</style>

However, the above is still showing the top navigation when printing. Any assistance is greatly appreciated.

هل كانت مفيدة؟

المحلول

You may try the below css as well :

<style type="text/css">  
  #s4-titlerow {    display:none;  

  } 
</style>

Source:

Hide The Top Navigation On A SharePoint 2013 And Office 365 Site Using CSS

Or try the below css :

<style type="text/css"> .ms-breadcrumb-top { display: none; } </style>

نصائح أخرى

If you're using on prem environment, you should be using this selector:

#DeltaTopNavigation { display: none; }

Currently you're using the selector to hide the ribbon, which is different from the navigation.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top