简体   繁体   中英

How do I change the footer background color in css?

I am having trouble changing the footer background colour in my CSS doc.

footer{ background-color: lightblue; text-align: center; } 

I also can't change the aside background color.

aside{ background-color: lightgray; }

I would really appreciate the help.

You can use a div inside the footer. See bellow fiddle:

 .site-footer { background: orange; } #footer-content { background: red; }
 <footer class="site-footer"> <div id="footer-content"> <p>Copyright 2017 @ Domain - All Rights Reserved </p> </div> </footer>

Following code is work for FREE THEMES specifically.

.site-footer .footer-top {

    background: #eee    ;
}

If you want to change the background color of footer text area as well, you can add following code with the first one ine the customize>Additionial CSS are:

.site-footer .footer-bottom {

    border-top: 1px solid #eee;

    background: #eee ;

}

Hope this will work for everyone, specially those who are using any free wordpress theme.

footer {
    background-color: #40e0d0;
    text-align: justify;
} 
aside {
    background-color: ;
    text-align: justify;
}

Above script is perfect working on my blogger site on "Add custom CSS editing theme code" https://www.seemainfoelibrary.com/search/label/Business%20Law

Thank you ever much I was searching such type of script.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM