Wednesday, August 8, 2012

Hide First Tab in SharePoint 2010 Navigation and Comment & Rating

I created a blog post on this for SharePoint 2007 HERE: But SharePoint 2010 is a bit more complex. Since it uses UL’s and Li’s for it’s navigation it is a bit harder to hide just one element.
image
You will notice that the Home tab actually is the first node and then has a child UL which represents the rest of the navigation Items. So the approach is to hide the first <li> <a> (display: none) and then simply just use (display:block ) to show the hidden <ul> <li> <a> tags.
Here is the CSS you could use to hide just the first node (home) tab in a SharePoint 2010 application:
.s4-tn li.static > a{ 
display: none !important; 
} 
.s4-tn li.static > ul a{ 
display: block !important; 
}

 As well as, if you want to remove  "Comment and Rating" as shown below, please add the following code.





.s4-socialdata-notif
{
   display: none !important;
}

No comments:

Post a Comment