28 Sept 2010

Sharepoint 2010 Global Navigation Hide First Item (Collection Tab)

I'm branding up a Sharepoint 2010 site at the moment and one thing that stuck in my craw was the Global Navigation. It shows the subsites and pages fine and dandy, but it also sticks the root site collection as the first item in the menu.

Now, you can probably remove it programatically with a solution like this, but I just wanted to do it with some style tweaks.

So just stick this in your custom css file:

#s4-topheader2 a.static.menu-item[accesskey="1"] { display: none !important; }


That works for most browsers but not IE6 (spit) cos of it's CSS2 failitude. For that you can use some sweet jQuery in a jiffy:

<script type="text/javascript">
$(function () {
$('#s4-topheader2 a.static.menu-item:first').hide();
});
</script>

3 comments:

  1. Anonymous6:30 am

    Dear Sir, i have spend hours for searching for this. Thank you so mutch. Regards, Peter from Belgium

    ReplyDelete
  2. Anonymous9:59 am

    how to change name of first item???

    ReplyDelete
  3. Hi,

    I have a situation where the site title replaced my Home tab. How do get rid of this SharePoint faltitude.

    Thanks,

    ReplyDelete

Comments are very welcome but are moderated to prevent spam.

If I helped you out today, you can buy me a beer below. Cheers!