How do I change the background color of the header and footer of my website?

[Note: The title of this post has been edited by a moderator.]

Hello,

I am currently creating a weebly website using a theme that I have selected. However, the only thing that I don't like is that both the header and footer are white, so I would like to change the color of both of them. I have tried looking at other community posts and changing the code, but so far nothing has worked for me. Could someone help with this? It would be greatly appreciated, and thanks in advance.

23,388 Views
Message 1 of 37
Report
3 Best Answers
Square

Best Answer

For sites built using the classic Weebly drag and drop website editor, you'll need to do some CSS customization like @BJ  gave in the post I linked.

If you built your site with the Square Online editor, click on your header or footer section, then click on Customize and then Section style. You can change the background to a color or image (or transparent if it's the header section).

View Best Answer >

23,383 Views
Message 36 of 37
Report

Best Answer

Add this to Settings > SEO > Header Code:

<style>
	.cento-header, .cento-header .nav-wrap, .footer-wrap
	{
		background: #000000 !important;
	}
</style>

Change the #000000 part to whatever color you want to use for them.

View Best Answer >

23,373 Views
Message 36 of 37
Report

Best Answer

I made a mistake in my code. Oops!  

Try this change instead:

.footer-wrap { .flex-shrink(0); width: 100%; background: #000; font-size: 14px; color: @backgroundColor; }

View Best Answer >

15,469 Views
Message 36 of 37
Report
36 REPLIES 36

That didn't work....

aynicenter.weebly.com

When I scroll down, it changes from white to a light peach. I need it to stay white or it conflicts with my logo... any ideas? 

7,330 Views
Message 36 of 37
Report

that doesnt do anything for me. I set the color to #005992, dark blue, but it still doesn't do anything.

6,874 Views
Message 36 of 37
Report
Square

It's possible the code is theme specific. Can you post a link to your website so people in the community can take a look?

6,871 Views
Message 36 of 37
Report

Hi, I added exactly this (but chamged the 6-digit color) and nothing changed.  Do you know what could've happened?

6,631 Views
Message 36 of 37
Report

Hi @keno,

Looks like you're wanting to make your footer the same black color as the rest of your site. If so try this code. Place it under Settings > SEO > header code, hit save, and then publish. 

<style>
.footer {
    background-color: #020202 !important;
}
</style>
6,618 Views
Message 36 of 37
Report

I am not a computer person. What am I chaning the number to? 

6,320 Views
Message 36 of 37
Report
Square

Hi @cc123  the 6 digit number in the code is called a "hex code" and is used in html codes. Here's a site that will show you the hex code numbers for any color you choose. https://htmlcolorcodes.com/

6,318 Views
Message 36 of 37
Report

This code didn'r work for me.

I want to change just header's backgound color. I want to keep the font color.

Can anyone help me?

Thank you

6,268 Views
Message 36 of 37
Report

I tried to use this code and it did not work. Want white instead of black. Any other suggestions?

5,491 Views
Message 36 of 37
Report
Square

Hi @rlyon I'm not super familiar with css code, but I do know that sometimes the code does not work in the editor, but applies to the live site? Did you check to see if the site is working properly when published? 

6,027 Views
Message 36 of 37
Report

Hi there Adam,

I created a custom HTML weebly site several years ago and decided it needed a refresh. I am not a coder, just a determined health coach Smiley Wink I transitioned to the theme 'Clean Lines' today and mucked about to simplify and adjust things. The one spot I'm stuck is changing the Nav Bar background color from white to anything else. I've become rather more obcessed with sorting it out than the color itself at this point.

I've searched for nav background color and hex color codes, but it seems this theme is using labels for colors maybe? My site is http://coastalcoaching.weebly.com/

Any help would be very much appreciated!

9,030 Views
Message 36 of 37
Report

I'm stuck.  I too am trying to change the color of my footer to black.  Everything I try simply reverts everything to the default font and teal colors but doesn't change the footer color.  Can you please explain to me as if I was 5 how to do this!  Where exactly do I put the code and what do I put in.  I know that the black html code is #020202.  I have not gone live yet with my site but here is the url https://www.embodyfc.weebly.com.

7,848 Views
Message 36 of 37
Report

.footer-wrap { .flex-shrink(0); width: 100%; background: #000; font-size: 14px; color: @backgroundColor; }

Hi - this code copied form Bj above worked great for me. Put it in the Settings-SEO-header code box.

Good luck! 

7,765 Views
Message 36 of 37
Report


@longtimeweeble wrote:
.footer-wrap { .flex-shrink(0); width: 100%; background: #000; font-size: 14px; color: @backgroundColor; }

Hi - this code copied form Bj above worked great for me. Put it in the Settings-SEO-header code box.

Good luck! 


Darn.  Nothing happened when I put it the code in the header code box or footer code box.  I do have other stuff in there that my digital marketing company put in.  I wonder if that is the issue.  Is this code specific to the Clean Lines template?

7,694 Views
Message 36 of 37
Report

Hey,

my way is go to THEMES - HTML (in the bottom for the coding) - look for STYLES - variables lights - change the color code from #ffffff to your color code in the first top row. Thats it!

It worked for me for me for Header and Footer at the same timeSmiley Happy

7,499 Views
Message 38 of 37
Report

Thank you, so much!! 

7,385 Views
Message 38 of 37
Report