Recently one of our clients wanted to have a link backĀ to their Intranet site on the left most tab of the top navigation.
Out of the box this isn’t possible because the left most link is always the Home page for the site collection. Apart from reworking the navigation menu to either use a custom navigation data source or any of the other options listed in this great post it seemed a little over kill for the problem.
Fortunately CSS came to the rescue! Since the home tab is always the first tab rendered and each navigational tab has an ID you can actually hide the tab.
If you look closely the first tab is called: zz1_TopNavigationMenun0 (The Home page tab), then we have:
- zz1_TopNavigationMenun1 (Tab #2)
- zz1_TopNavigationMenun2 (Tab #3)
- zz1_TopNavigationMenun2 (Tab #3)
- zz1_TopNavigationMenun…(Tab whatever number)
In order to delete any tab then simply use this CSS code
#zz1_TopNavigationMenun0
{
display: none !important;
}
And away you go.
How we then solved the problem was by creating a link through Site Actions->Site Settings->Modify Navigation and put in a link at the very top.
Since the first link was removed this became the left most link and everyone was happy.
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
