Colin Kincaid Williams
2011-12-01 22:37:34 UTC
Hi,
I'm setting my page background via javascript by DOM reference
document.body.style.background="#f3f3f3 url('/images/xenopus.jpg')
no-repeat center fixed";
It sets the background image properties as expected . I'm also trying to
change the background image size
body {
background-size: 20% auto;
}
however, the background image size does not seem affected. However it does
seem to work in webkit browsers. I tested chrome, and somebody else told me
it works in safari.
Document.body.style.background doesn't have option for background size, why
is the background-size not applying? Is this a bug or does it have to do
with firefoxen dom traversal? The page in question is
http://freediscord.com/usingBodyBkgrnd.html .
Furthermore, I noticed in firebug it shows the CSS set as:
element.style { background: url("/images/xenopus.jpg") no-repeat fixed
center center #F3F3F3; }
body { background-size: 20% auto;}
So shouldn't my background-size be set? Is this a bug or is this how its
supposed to work. I'd really like to get it working in both webkit and
gecko....
Sorry if this is the wrong place for my question.
Best,
Colin Williams
I'm setting my page background via javascript by DOM reference
document.body.style.background="#f3f3f3 url('/images/xenopus.jpg')
no-repeat center fixed";
It sets the background image properties as expected . I'm also trying to
change the background image size
body {
background-size: 20% auto;
}
however, the background image size does not seem affected. However it does
seem to work in webkit browsers. I tested chrome, and somebody else told me
it works in safari.
Document.body.style.background doesn't have option for background size, why
is the background-size not applying? Is this a bug or does it have to do
with firefoxen dom traversal? The page in question is
http://freediscord.com/usingBodyBkgrnd.html .
Furthermore, I noticed in firebug it shows the CSS set as:
element.style { background: url("/images/xenopus.jpg") no-repeat fixed
center center #F3F3F3; }
body { background-size: 20% auto;}
So shouldn't my background-size be set? Is this a bug or is this how its
supposed to work. I'd really like to get it working in both webkit and
gecko....
Sorry if this is the wrong place for my question.
Best,
Colin Williams