Skip to Content

How to hide .sapMPageHeader?

Hello, I am trying to hide .sapMPageHeader because I have shell that displays the header so I don't need a .sapMPageHeader. I've tried hiding this with CSS through this:

.sapMPageHeader{
display: none;
}

This works except I am not able to directly do this cause "Override of common (sap.ca / sap.m) css classes are not allowed sapui5" .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Feb 11, 2020 at 08:40 AM

    > I am trying to hide .sapMPageHeader

    Rendering of sap.m.Page header can be skipped with:

    <Page showHeader="false">

    > I have shell that displays the header so I don't need a .sapMPageHeader

    In that case, consider taking advantage of automatic adaptation as described in the topic Enabling the Automatic SAP Fiori 2.0 Header Adaptation in the Descriptor:

    "sap.ui5": {
      "config": {
        "sapFiori2Adaptation": true
      },
      ...
    }

    Despite the name "sapFiori2Adaptation", the above config works also on a Fiori 3 launchpad.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 11, 2020 at 08:00 AM

    Hi Betty,

    try with :

    .sapMPageHeader{
    display: none !important;
    }

    regards ;)
    Sebastiano

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 11, 2020 at 08:11 AM

    Did you try page control property showHeader, which if you pass false will hide the header.

    -Mahesh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.