How to Hide the Background When a Page Doesn't have the Header Showing

Advanced Technique

Sometimes you may set up a content page that does not show the header on the page. Without your natural header showing, the background on your page may look out of place. That can easily be fixed with some CSS.

An example of a page not showing it's header, but the background still shows:

How to Hide the Background When a Page Doesn't have the Header Showing

 

Hiding the Background

1. Under 'Content' choose 'Add Content' or 'Edit Content'

1. Under 'Content' choose 'Add Content' or 'Edit Content'

Add Edit Content
2. Hide the header through the 'Show Header and Footer On This Page?' field

Hide the header through the 'Show Header and Footer On This Page?' - choose 'Show Footer Only' or 'Don't Show Header or Footer' from the drop down menu

How to Hide the Background When a Page Doesn't have the Header Showing
3. Check the box in the 'Custom Header and Footer Javascripts' field

In the 'Custom Header and Footer Javascripts' field, check the box and add the following CSS to the 'Custom Header Javascripts' box:

<style type="text/css">body { background: none !important; }</style>

How to Hide the Background When a Page Doesn't have the Header Showing
4. Apply changes to the page.

Apply changes to the page.

And that's it!

Here is the new page:

How to Hide the Background When a Page Doesn't have the Header Showing

 


Changing the Color of the Background

Perhaps instead of removing the background, it is preferable to update the color.

1. Under 'Content' choose 'Add Content' or 'Edit Content'

Under 'Content' choose 'Add Content' or 'Edit Content'

Add Edit Content
2. Hide the header through the 'Show Header and Footer On This Page?' field

Hide the header through the 'Show Header and Footer On This Page?' - choose 'Show Footer Only' or 'Don't Show Header or Footer' from the drop down menu

How to Hide the Background When a Page Doesn't have the Header Showing
3. Check the box in the 'Custom Header and Footer Javascripts' field

In the 'Custom Header and Footer Javascripts' field, check the box and add the following CSS to the 'Custom Header Javascripts' box:

<style type="text/css">body { background: #003399 !important; }</style>

*Replace the background color with another hexadecimal color. For example, a white background would look like background: #FFFFFF

4. Apply changes to the page

Apply changes to the page.

And that's it!

Here is the new page: