When the ribbon is used on a Publishing Site with anonymous access turned on, SharePoint still displays a blue bar at the top of the screen that does not blend in very well in heavily branded sites.

The ribbon can be removed from your master page using the following trick:

<!-- =====  Begin Ribbon ============================================================ -->
<SharePoint:SPSecurityTrimmedControl ID="SPRibbon" runat="server" PermissionsString="ManageWeb">
    //RIBBON SECTION (See details below)
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none;"></div>
<!-- =====  End Ribbon and other Top Content ============================================================ -->

The ribbon section is everything contained in the already existing div and closing tag of your base masterpage (all 250 lines or so).

<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">

The SPSecurityTrimmedControl essentially will only display for users that have required permissions to the site. In this case we used the ManageWeb property but you can use a different level to achieve the same result.

The div that is placed outside the SPSecurityTrimmedControl is there to allow SharePoint to properly calculate the scoll bar position, height and visibility.

That’s it for today. Stay tuned, there is a lot more on the way!