treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Background-Position in FF acting funny

  • Ok so here is what I am trying to accomplish. I am using a large background image and I would like it to fit flush with the bottom, right of the browser window. I am using the following css and it works in both IE and Safari, but not in FF.

    body {
    background-color:#70706C;
    background-image:url(../images/bg.jpg);
    background-position:right bottom;
    background-repeat:no-repeat;
    }

    here's a link: http://www.ridethebeave.com (no its not a porn site, its a micro site for beaver creek ski resort.)

    Any suggestions as to why FF is treating the background-position property improperly?

    Rich Staats
  • oh and i am on a mac.
  • As soon as you delete the no-repeat it works... but obviously will repeat...
    I shall have a little more of a play :)
  • The problem is you don't have any content in your body, so the body is only a few pixels tall because of the space. You aren't able to force the body to be taller in Fx, you'll just have to add content.
  • that chris dude is right ;) ... for a quick fix set your html height to 100% :)
  • thanks chris, rob. It all makes sense, and is pretty obvious to me now. I appreciate the help nonetheless. In the final product, the bg image will only be the texture and the rider, while the rest of the content will be added to different sections of the html...I just wanted something up right away--and perhaps rushing everything allowed me to not think clearly. Thanks again!

    Rich