drake035
drake035

Reputation: 2897

Background-position with an offset doesn't work

The background-position rule below doesn't work and isn't even visible in Firebug as if the browser considered it a mistake:

body {
    background-image: url(images/bg_image.jpg);
    background-size: cover;
    background-position: 50% bottom 10px;
    background-repeat: no-repeat;
}

What's wrong with this?

Upvotes: 0

Views: 49

Answers (1)

BoltClock
BoltClock

Reputation: 724592

When specifying offset edges, you need to specify both of them, even if one of them is the default:

background-position: left 50% bottom 10px;

Upvotes: 2

Related Questions