Hi
I’m in need of some help ... I would like to be able to set a background image using a onload javasacript along the lines of
and then position it with css.. something like
only thing is I can’t figure out how to name the image in the JavaScript, so the CSS can “see” it and therefore control it. I’m still learning and have arrived at this requirement without knowing if it’s actually possible to do. I’d appreciate any help
Giles
(p.s I kind on need to do it this way rather than set a background image in the CSS itself)
I’m in need of some help ... I would like to be able to set a background image using a onload javasacript along the lines of
PHP:
document.body.stylebackgroundImage = url()
and then position it with css.. something like
PHP:
image {
width: 800px;
height: 600px;
margin-left: auto;
margin-right: auto;
background-repeat: no-repeat;
background-position-y:center
}
only thing is I can’t figure out how to name the image in the JavaScript, so the CSS can “see” it and therefore control it. I’m still learning and have arrived at this requirement without knowing if it’s actually possible to do. I’d appreciate any help
Giles
(p.s I kind on need to do it this way rather than set a background image in the CSS itself)