0

How to hide the group title in a server ribbon tab?

I've seen a picture of a ribbon without group titles, but removing the group title or just leaving it blank, produces a nerfed layout, which look like this:

Ribbon nerfed layout

I customized the server ribbon following this tutorial http://www.sharepointnutsandbolts.com/2010/01/customizing-ribbon-part-1-creating-tabs.html

The sharepoint version I am testing it on is 2013.

0

It appears that the group title needs to be specified in order for sharepoint to work correctly. But a grouptitle can be hidden via css. The class responsible for the group title is "ms-cui-groupTitle". So in css we hide it wit the following command:

.ms-cui-groupTitle {
    visibility:hidden;
}

This way the group title exists, but it is invisible.

UPDATE:

The visibility attribute hides the group title, but leaves a blank space there. Using "display: none" the entire ribbon is nerfed, and does not work correctly.

So to overcome both issues, the ribbon needs to be scaled. This is done by adding height definitions to .ms-cui-tabContainer and #s4-ribbonrow

.ms-cui-tabContainer {
    height: 60px;
}

body #s4-ribbonrow {
    height: 100px !important;
}

This way, the ribbon is rendered perfectly

The downside of this is that it scales the other tabs. In my case it scaled the "PAGE" tab to this:

Shrinked ribbon tab

Which is actually not bad. To overcome this the heights must be defined based on the tab id, so the other tabs will not shrink.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.