I've put together a CSS-Only way to remove this message, while keeping the status messages for other scenarios (like items or pages being checked out) visible.
For starters, the markup for a customized page that is also checked out looks something like this:
<div id="pageStatusBar">
<span id="status_1">
<span id="status_1_body">The current page has been customized from its template. [...]</span>
</span>
<span id="status_2">
<span id="status_2_hiddenPriMsg" class="ms-hidden">Important Status</span>
</span>
</div>
What we need to do is remove the CSS for the banner div and move it to the specific child span's classes. Luckily each type of message has its own unique ID, e.g. status_1
, status_2
, etc.
So we start with this to clear the necessary styles from the div container:
body #pageStatusBar {
padding: 0px;
border: none;
}
We don't have to worry about colors/background colors, since we only need to make the div box have no size in order to hide it. Then we add the necessary styles to all the spans except #status_1
, which is the one we want to hide:
#pageStatusBar > span[id^=status_]:not(#status_1) {
padding: 4px;
display: block;
border: 1px solid #CAAC09;
border-left-width: 0px;
border-right-width: 0px;
}
Note that the direct descendant combinator (>
) is necessary, because some of the status_#
spans have children spans (as you can see by looking at the markup above) that also have IDs beginning with status_
. If you leave out the direct descendant combinator, you will add the border and padding to those children spans, as well, doubling or tripling your banner size.
(This answer has full browser support, including IE7+, and works even if users have disabled JavaScript)