Archived

This topic is now archived and is closed to further replies.

  • 0

Footer Background not Displaying


Question

Posted · Report post

Hey & Happy New Year

 

I am trying to pull in a fixed dimension footer background with CSS.

Here is the site:

 

www.trulymadlykids.co.uk

Here is the code I am using:
#footer {
    background-image: url(http://www.trulymadlykids.co.uk/wp-content/uploads/2013/01/Footer-Background.jpg);
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:center;
}

 

I have tried my own tweaks, Firebugged it, but nothing.

Any tips gratefully apppreciated.

Cheers

Melissa

Share this post


Link to post
Share on other sites

2 answers to this question

Posted · Report post

Thank-you! I had the selector wrong. Forgot about the fixed width.

For anyone else, here is what works for me:

body.fixed_width #footer {
    background: url(http://myurl.jpg);
    margin: 0 auto;
}

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Melissa,

 

Firstly, site looks great! However I can't see where the footer is on the page, have you hidden it until you get this sorted?

 

As the site is fixed width it will use a slightly different selector as per below. The footer will need to be unhidden for the css to show.

 

body.fixed_width #footer {
    background: none repeat scroll 0 0 transparent;
    margin: 0 auto;
}
1 person likes this

Share this post


Link to post
Share on other sites