Skip to main content

SharePoint 2013 - Hide Root Node Link in Global Navigation using CSS

The other solutions I've found regarding this involve javascript/jquery.  Was unable to find any CSS that resolves the issue nicely.

This seems to have resolved the issue for me so far without compromising any other areas of the site.  It hides the initial link and then goes back to displaying the rest of the navigation as per normal:

<style type="text/css">
.ms-core-listMenu-horizontalBox li.static > a{
display: none !important;
}
.ms-core-listMenu-horizontalBox li.static > ul a{
display: block !important;
}
</style>

Comments

  1. Could you please tell me where to put this css code. I use "seattle" theme...

    ReplyDelete
    Replies
    1. Thank you for your answer.
      I created the CSS file with the following code:

      style type="text/css"

      .ms-core-listMenu-horizontalBox li.static > a
      {
      display: none !important;
      }
      .ms-core-listMenu-horizontalBox li.static > ul a
      {
      display: block !important;
      }
      /style

      Could you tell me where should I put the reference to this file?

      I am using seattle theme.

      Should I put the reference in head or the body part?

      Delete
    2. Hi Srdjan,
      Best practise is to put the reference to the .css file in the Head of the master file, so that the page doesn't render without the styles already having been applied.

      You can reference like this:

      < SharePoint:CssRegistration Name="<% $SPUrl:~sitecollection/Style Library/SG2013/css/bootstrap3.min.css %>" runat="server" />

      Cheers,
      Brett

      Delete
    3. Brett,

      I did everything you stated, it does not remove the home link...

      Srdjan

      Delete
    4. Hi Srdjan,
      I just created a blank Web Application. then created a copy of the Seattle.Master file as you can't modify the original. I then pasted the CSS code directly onto the master page and checked in a major version and it worked perfectly.

      Oh, I also had to change the master page that the site was pointing to in Site Settings > Master Page > Seattlecopy.master.

      I presume it's just the connection to the CSS file that is the problem.

      Remember also that when you are creating a file for your CSS you don't need to use the open and close < style > blocks.

      Maybe try copying the CSS directly to the master file and seeing if that works for you first.

      Cheers,
      Brett

      Delete
    5. Hi Srdjan-
      I added a link on the _layouts/changesitemasterpage.aspx to a css file with this in it under the section where it asks for an alternate CSS URL. It does not remove my root node. Is there something I am missing?

      Thanks,
      Jesse

      Delete
    6. Hi Jesse,
      I've never used the Alternate CSS URL option on that page, I usually insert the link into the Master page directly via SharePoint Designer. This way you can force SharePoint to look at your CSS file AFTER it looks at the CORE.css file.

      However, what you did should still work. Is the code above the only code you have inside your CSS file?

      Also, just to make sure: inside the CSS file, you don't need to reference the following lines:
      style type="text/css"
      /style

      Cheers,
      Brett

      Delete
  2. How can you change this in the Master page rather than through CSS?

    ReplyDelete

Post a Comment

Popular posts from this blog

Export Group Membership From Active Directory Using Power Query

If you need to export a list of staff from an Active Directory Group, follow these steps.  Allows you to gather all the names & usernames of staff in a particular group and save the information into Excel.

Step By Step How To:
Open up Excel > Power Query TabClick From Other Sources > From Active Directory:(In Excel 2016 this is found under: Data Tab > New Query > From Other Sources > From Active Directory) screenshots from Excel 2016 on left, Excel 2010 w/ Power Query Add-on right A popup will ask you to enter your domain name.  It should already be populated with the correct information but if not, input your companies domain name & Click OK:
In the Navigator that opens up, expand your domain tree and double click group:

You should now see a list of all groups in Active Directory in the Power Query Editor:
In order to find & filter for a specific Group, Click the Down-Arrow for the 'distinguishedName' column > Text Filters > Contains...
Type the name…

HP Laserjet 1022 Printer - Can't Print on Windows 10

If you are having trouble getting your laserjet working on Windows 10, here's how I resolved the problem:

Go to Devices & PrintersFind your printer & go to Printer Properties > Advanced TabSet Driver to: HP LaserJet 1022 Class Driver & ApplyIf HP LaserJet 1022 Class Driver is not available.  download from this site: http://support.hp.com/us-en/drivers/selfservice/HP-LaserJet-1000-Printer-series/439424/model/439431Print a test page.


SharePoint Online - Branding with CSS

-----------------------------------------------------------------------------------------
This post is related to a larger group of posts called Migrate SharePoint to Office 365 - Planning & Steps
-----------------------------------------------------------------------------------------

I've gone with a Publishing Site Collection so that I can use the 'Alternate CSS URL' in Site Settings > Master Page.

First off, thanks to the following websites which helped get me started:
http://blog.sharepointexperience.com/2015/02/sptechcon-austin-february-2015/#more-2766http://blog.sharepointexperience.com/2015/01/to-brand-or-not-to-brand/ Here's what the end result will look like (if you have the same fonts):


Now for the CSS...

/* Design By : Brett Randall*/
/*     Design Colours: Greens/Greys/Blues */
/*     Last Modified : 28/02/2017*/
/*     Description: CSS to rebrand SharePoint Online Publishing Site Collection that is using seattle.master */

/* TABLE OF CONTENTS
-- -…